SOM code partially cleaned.  Graphing code improved.