Improved quantizationtools.