Exits a little cleaner now
Removed some unused code