Minor code cleanup and formatting. Board.clear now clears sets of chains.