Clean up HTML in pattern library, fixes margins