cleaned up code in board controller