Fix issues and documentation in Ensure.

Performance speedup.