xml position write, cleaned up and added comments

it is now possible to write the location of an object to the
configuration file