coverts to controllerAs syntax. note: controller.js line34-43
fixes some forgotten syntax.
fixes editing bug
replaces  for