Updates to fortran methods and generator to facilitate wrapping.