Lots more porting.

Yyyaaaaaay, down to 300 or so errors (mostly apis)