code rewrite for rethinkdb
calibre state
updated ogreclient along with rethinkdb rewrite