some minor refactoring work for application class