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
Personal changes.