various code cleanup
cleanup