Exit program in a cleaner way