refactored XML generation into a separate function
added a way to edit objects by using PUT
added tests for PUT and fixed some issues discovered