Beginning a refactor, now that I actually know how to use jQuery.