Cleaned up lots of C code, adding lots of whitespace.