Separated angular code into separate directives, services, controller files