numerous minor fixes.