How do companies protect confidential inventions and trade secrets legally?