Changes to make OptimalShapeDesign work. Remember never to initialize a Function with an other Function: they will be the same after.