#782: Polished
#817: moved ClassScanner from json-schema to util so we can reuse it.