Move Log into common and change self to that

that is preferable over self since if self is undefined it will default
to window.self.