Minor cookie code cleanup and verification.