fix token exchange
some pr review fixes
Merge pull request #36 from jtolds/master

fix token exchange