Minor refactoring to remove duplication of direction identifiers