Replace database queries in repositories with Morphia

Remove this