Optimize mailchimp code