refactor app into modules