update controller, ngroute and MVC pattern code.