Refactor the config and add config for the osd