updated angularjs architecture