Implement extension types.

See #33