Refactoring app into modules