Refactoring. Loads of it.
Refactoring. Test driving negamax.