Removed unused stuff from the app delegate.
Cleaned up other stuff, (that should be handled by the type inference instead of me)