Clean up code

Added a couple of new tests, cleaned up code, changed to use dependency
injection for xml parser element within location.