Extracted a "BoardRender" class

Extracted the board-drawing process in a class "BoardRender". Rewrote
the command parser. Some other minor improvements.