A number of cleanups. Now compiles with libc5, glibc, and uClibc. Fix a few