Separate pre- and post-quantization.

Work in progress branch for #106.