minor code cleanup & changed all `AWS S3` header keys to lower case