Fix import errors.
Fix visualisation for minimising a function.