Cleaned up various things to remove a bunch of compiler warnings.