big changes in controller, added global select delete update and insert, DRY the best