Resolved some differences between what the XML refactorings would allow and what we allow, and significantly beefed up the unit tests for refactoring changes.