Moved all logic from app to controller and wired up router