Adding model and logic; wiring backend routes with front end