First stab at a fix - now propertly populating the directive lists.
Handing back to Brad for further work.