S3 abstraction

Improving the abstraction layer around Amazon S3.