Many small improvements to address the points raised in https://github.com/gem/oq-nrmllib/pull/115