reorganized angulat directives and controllers