Added ability to specify units. Removed quantization option since it just reduces accuracy.