Split instance and solver into script and function, respectively