Cleaned up code for excecuting spells, by giving each function a class