some prep work for entry timer directive, and some state template refactoring
refactor controllers, services, states and directives into separate modules