fix --quiet option and some simplifications