Use data attributes rather than a data array

This makes use of different data() attributes rather than the data array.