Finished refactoring application structure