added a bunch of logging and implemented soft deletes