added a tokenstream struct - major refactoring incoming