fix ownership semantics of keys
trim newlines from test keys
fix tyop on key name output
fix hash to use unsigned bytes/ints