reorganization of html and partials in angularjs; some functionalities