Add S3 implementation.

Finished S3 method.