minor refactorings; hard-coded more simple tokens; added test case