Wall Street has learned a lesson from the battles that have erupted for control of the bankruptcies of hotel owners Extended Stay Inc. and Innkeepers USA Trust: There has got to be a better way to build a commercial mortgage-backed security. The strategies used by some investors to gain control of these failed companies has exposed flaws in the structures of CMBS, the commercial real-estate industry's favorite boom-time financing tool. But now, as investment banks revive the market for the securities, they are making structural changes designed to close these loopholes and curb these tactics. Doing this will help determine how quickly the CMBS market can be fully restarted after its recession-induced hiatus, which many consider critical to restoring health to the commercial-property industry. CMBS, a market in which mortgages are chopped up and sold to thousands of investors as bonds, accounts for roughly $750 billion of mortgages now outstanding.