Cleaning up plugin to use mongoose and config files