Updated plugin routes management
changes usage of defines. in defines file include your defines, and from controllers, use system.defines('key')
Changed inbuilt db(mongo), to configuration library, and included in lib folder