@edds suggested improvements

- Use .data() instead of .attr() for accessing data attrib
- Rewrite a bit of JS that adds controls to the DOM for fewer DOM lookups AND clarity
- s margin 0 0; / margin 0;