Renamed pre/post delete signal handlers and reduced the number of queries.