some code pleanup
some more cleanup