move Head service functionality to directives