Improved S3 support