board.c: cleanup code