Got the adjoint solver working