Fixing recursive bug due to a typo in function name and some cleanup
Removing unused functions
Removing setting of token here. Its set in the model
Removing debug string