Adding Graham's fixes to pattern library