Tests and minor fixes.