Cleanup tests and simplify Ipopt functions