Cleaned up a bunch of logging code.