Use bit positions and only create sparse string at the end of the process. More lightweight I reckon.
Some more unit tests.
Merge branch 'wip'