Lots of updates.  The code now passes the header test and compiles correctly on Mac.