Refactor of app to import modules based on method invoked