almost functional (nats and test)
some cleanups and notes