Backup: Major code cleanup follows