Moving some code that wasn't cookie-related out of an #ifdef