rethinkdb -> mongodb along with some minor improvements