Improve FsCheck test case generators

Close #162.

FsCheck testing reveals some bugs that will be fixed separately.