Clean up the javascript a little bit.