Changes to better deal with concurrency, consider handling death via db trigger
Fixed AP delta bug