Improve speed; improve goodness heuristic