Merge "ART: Refactor imgdiag internals"