Fix issue with excluding literals starting with digit(s)

* update tests
Refactor by extracting some methods