global cleanup to use the new syscall interface
finish moving 32-bit-specific junk out of source files.
initial check-in, version 0.5.0