Clean up and document src/board.c