Split the javascript into multiple files.
Make sure you edit the appropriate files, to keep confusion to a
minimum.