Minor cleanups and tests

 - not much else