Patch many things, make norh work and write some tests.

Tests still use local data, the data files are too large to include
as-is so I will have to shrink them.