Added Schema
Document lifecycle, switched to using r.json for inserting documents
Fixed deadlock
Document lifecycle
Update build