Rewrite fortran code (shit).