Replace dataset and ensure parseInt have radices

Turns out `dataset` wasn't supported in IE until IE11, so I've switched it to `getAttribute()`, which is apparently faster anyway.

Also ensured that any usage of `parseInt` also includes a radix variable, to ensure that they're parsed in base 10.