cleaning up some river code and putting in some temporary debugging info