Clean up.

Cleaned up some JavaScript code.