Refactor head transforms for better ordering