Fixed some of the river code, and added more tests