Removed potential division by zero bug
Cleanup + doc
Separate class for tokens