autoregister
various cleanups