Further work, including bug fixes, better error messages for combinatorics / formatter
unit test