Clean up some warnings using clang -Weverything, including two instances of variables being declared in header files instead of in .c files and just extern'd in header files.