Refactor: Migrate main app functionality into EncoreApp