reworked structure, upgraded to angular 1.2.23