Be consistent with coding style throughout the file
Add test for spells view
Move logic to model and use ListView for spells