general code cleanup.