controller objects changed to classes, routes and tests amended appropriately