Fix bug in parsing of comments.

Also introduce options for quantile method.