Fixed transition model estimation, but it seems to be really poor (if working).  Put this in main2.cpp, and restored original code to main.cpp.