Small cleanup
SpellHandler: add more error checking + cleanup.