Various improvements and small fixes to the generic stateful scanner
Various improvements and small fixes to the generic stateful scanner

markwatkinson/luminous,markwatkinson/luminous,markwatkinson/luminous