Move directives to lib