Cleaning up the js a little bit.