Win code cleanup