Fix board layout printing
Extract global variables initialization

Extract global variables initialization to separate function.