Reformatted scratch workspace assignment for each function.