Remove all references to HEAD from code.