Improved Mongo queueing and various refactors