Refactored all the config and changed the yaml parser