Refactored scanning, adding a match method to match a specific type of token.
Miscellaneous cleanup.   Removed scanner statistics which weren't being used.