Simplify sanitization API (fixes #282)