Better logging and cleaning up a couple things.