Fix bugs caused by moving board to new class
a few slight speed optimizations