Adds some test code, actual logging, and updates around that.