Refactoring Direction module