More hdr refactor