Starting to break up the single file into individual .js files

No code removed from the main file yet, just created the new files and
copied existing code into them.