Extract heuristic methods, refactor