Refactoring of quantization