Added refs, deferred, and expanded events.
Merge pull request #16 from joneshf/master

Added refs, deferred, and expanded events.
Remove unused type variable and allow refs.
Merge pull request #17 from joneshf/master

Remove unused type variable and allow refs.
Remove duplicate definition
Merge pull request #18 from eamelink/patch-1

Remove duplicate definition
Add transformState function