Fixed beam bug, added stone count heuristic