Essays on offshoring, innovation and foreign ownership