Removed use of System.exit(0)