Cleaned up a lot of g++ warnings.