Improved heuristics.
Merge pull request #37 from niode/new

Improved heuristics.