Directions code cleanup