Properly test psj_gnd_terms.
Fix problems discovered by tests.
pep8.