organize controller and directives