Make quantization code more portable
Merge pull request #179 from manisandro/quantization

Make quantization code more portable