add caching of jquery elements in add_yodalabels function. Changed how event handler functions are defined to get around hoisting issue