Some refactoring in Application module.