refactor configs and add exrm