Seems my invalid token problem has been fixed along the way.  Added tests to make sure we've got the right number of tokens.