Add `mongoose` and `lodash` as devDependencies [ci skip]
Refactor the module to lose its dependencies and fix bugs.

- Remove lodash
- Fix bug when validating the `context_type`
Add rudimentary tests