refactored structure of board_controller and its tests