Some minor code cleanups for Control Panel.