Converted the calc, grid_search and minimise user functions to the auto-generation design.
The minimise user function required a lot of work, as the minimise(*args, *kargs) construct is
incompatible with the auto-generation design. As this is hardly used in the field, everything has
been converted to specific keyword arguments. This will have a side benefit of being easier to
understand for a user. The back end was modified accordingly.