Refactored entry points to have uniform shutdown handling