made an exit function and cleaned up the project some more