More tests; minor fixes.