I made these changes in order for tests to pass but then I discovered that it wasn't consistent across  browsers. So we've got to have a normalizer to order the attributes predictably.