refactor spells and effects