WIP #22, more tests; small fixes