Minor tuning of encoder heuristics.
Merge pull request #8 from szabadka/master

Minor tuning of encoder heuristics.