Refactoring spell system.