Updated to use constructors and polyfills. Updated the example.

Not functional at this time