Hungarian broken up into main part and core modules, apparently functional bitwise version (should probably verify with bigger pixels...) running quite a lot faster, once doing a lazy flattening of the coverage sets and then iterating over those (MIGHT be worth looking into for normal version...)