refactored model some.  wrote some toy scripts to examine the logs.   started a js port