Added a test for registrations, fixed some bad XML parsing helpers
Genericise tests