Initial working version of s3 xml payloads.
Rebasing and fixing merge conflict.