Optimized some code for faster loading

Reduces API calls on Ajax loaded elements.  Thanks Gary!