some code cleanup
more cleanup