2 bug fixes, no global data objects, and correct path to data attribute