Added open query button, save scenario refactor