More rewrite. Slowly getting behind the stage of RavenDB.