Cf fixes to 377

Branch #377 with fixes for compiling and running under CF, except for the IParameterDataProvider problem, which will be a new issue.