Server code cleanup.