Factor out board. Tweak heuristic