implemented more legible approach to defining Mongo schemas and transforming the data