Adding changes for M4 from NSF. See https://github.com/paulswithers/openlogjava