Use data attributes instead of just setting a value attribute. Also cleanup.