Cleaned up the app delegate.