Continued work on Mac version. Does not run properly, but compiles and can run from GDB. Requires gfortran.