blame heuristic refactor, added utests