Improve metadata query diagnostics; update documentation diagram; move documentation file