Integrate file attachments in to model docs, clean up db structure.