small refactoring of applicationcontroller
Merge pull request #10 from JoshFB/smallrefactor

small refactoring of applicationcontroller