Final code cleanup.