some code cleanup.