Improved the parsing of the board string