some refactoring in tokens.hs