Bunch of JS clean-up.