distributed functionalities from board to blocks, refactored code