refactor canopsis app and entry point