some refactoring, and added ability for board to dump to string