Added python callback, fixed fortran memory leaks (only applies for repeated usage of solvers in same session) and various other changes