Removed unimported "log" references and replaced with either "self.debug" or "logging"