An update which implements strong typing to the fortran code. Function and results should be the same as previous versions.