added pages stuff in model, controller, routes