Simplify exit in main