Some general code cleanup.