Fixing small bugs. Order output by karyotype.

We had a few small bugs introduced by bad/missing imports and by not
namespacing a hash correctly. So that's all been fixed.