Backend refactor that pushes more code into shared base classes, making Queue, WatchList and History backends easier to write.