Refactor the config, add parameters parsing