Some code cleanup.