Moved out all our directives into self contained directives ready for unit testing.