Added views function to save a query

Also modified the models to make delete a saved query easier