Improvements and refactorings to the chessboard and square classes.