Added new option to config file to enable debug mode. False by default.
Refactored config.json parsing.