Cleanup some XP functions, remove unused scoreboard values, minor refactoring.
More minor cleanup.