More funspecs in ch-4; fixes in ch-1; refactoring.