refactoring to routeable app