Fix plan quatity & type handling. Also fix pretty-printing of quantities that contain commas.