Major bug fixes with levelling system.

TIL why no commit before playtest. :p

The XP system was completely broken, partly through my own typos, and
partly through bad code in the original examples (missing parentheses
and game logic issues).

Should all be fixed now.