added an xml writer to the controller, also added a basic saving class
updated the IO to check for existing files and fixed controller to create the proper index.