Adjustments to token module.

Refactored the module, included documentation, added special tags