code cleanup
fixes