Reorganising the mongoose models and rest routes.