Add possibility for relaxed heuristics.

Fixes #52.