A variety of fixes (five commits from JAR)