Refactor magic to sorcery