Add models: document, study, tag and tagged text

Could you guys check this before merging?