Still more porting.  parts of it compile.