Updated data layer to use mongoose