Addressed comments, repaired tests and added query save