cleanups and cli fixes