Added ChessGame and fixed a bunch of bugs.