Cleaned up application initialization.