Changed config pattern to have JSON object of collections
Added functions to handle configurations
Added DB constants
Properly handling config and constants values in the code
Some refactoring