Add delete query handling
moved structure reset handling in the changeholder