Split config, factory and directive bits into separate source files