Changed the controllers to use the entity generated models, added lots of boiler plate code.