Spells refactoring

Task is unfinished (there are some more ideas to implement right now). Request for review & testing (not merging).