add support for --quiet and --exit-code options

(useful for scripting)
fix inner class comparison