Removing useless sys.exit calls