[REFACTOR] Split main app into modules.