Renamed api sub-package to core
Integrated mongodb with generate command.