Update test file
Break main script into modules

Set up nickleby to use browserify. nickleby.js will only include
the generated output of browserify; the content formerly in
nickleby.js is in nickleby-main.js.

Run browserify as:

  browserify nickleby-main.js >nickleby.js