Fixed bugs and made board generation faster