Implemented the mappings, something still seems wrong with Gradient method for new adjoint method.