Cleaning up javascript a little.