Hooked up events for writing to the new databases