Moved parallel state stuff to its own js source file.  Added sample source code.
Another whitespace change to match upstream/master