some more cleanup and cli stuff