Yeah, korlib was a bit faster than this implementation, but, honestly,
having a second python module made life more difficult than it needed to
be. This fixes that.
We are attempting to encourage the pages=layers paradigm; however, this is
not strictly enforced. This commit has lots of bits and bobs but little
actual substance. More to come when I begin work on the exporter.