Replace database queries in repositories with Morphia

Delete this for consistency with other files.