fixed stub main
more cleanup