add some lifecycle stuff, command line tests