Remove undoMove(), rewrite win-checking, refactoring