Code cleaning
Merge branch https://github.com/Foxiy/board2slides
Moved board detection to a function

* Moved board detection to seperate function. Added and reworked some
  function descriptions. Removed unused variables.

Signed-off-by: Ondrej Jariabka <o.jariabka@gmail.com>