more refactoring, directives