Removed all valgrind detected errors from board.c and board_test.c.