Extra parameters to cross-section function make it possible to ignore part of the search space.
Added a test for the enhancement.
Created auxiliary method to find glyph indices as a first step towards performance improvement. Tested, but not used by other code yet.
Improved performance of section counting function.
Reduced length of cross-section function and improved performance.
Reduced length even further without reducing clarity.
Fixed function so that it uses additional data again.
Finished refactoring the function for now.
Should do something theoretically, but gets stuck on a particular input file.