Updated for CF7 v3.7.x - no more globals