quicksave code cleanup