Adding some better, general-purpose heuristics