Refactored JS to use jQuery! Yay!