Chain rule for derivatives moved to Fortran; bug found in previous evaluate method in getx function, but evaluate method rewritten