Refactoring the config file to be json