refactoring client and removing unused directives