The MERCURY code from John Chambers plus additional source edits