some code cleanup
more code cleanup