Added the capability to expand the referenced resources in to_hash through the ;max_levels option to to_hash. Please do no longer directly call to_hash_brief in code, but ALWAYS call to_hash with the appropriate options set.