WIP wired up query save/update. Need error handling and such.