Switch to flat output hash

Prior to this commit we had nested keys, this may not make sense
going forward. This commit adds changes to support rendering in
the future.