Complete overhaul of s3 for future support with Node environments.