Added rethinkdb middleware