Done some code cleanup.