Merchants and bureaucrats, however, preferred to close off the front with an imposing front gate. All buildings were legally regulated, and the law held that the number of stories, the length of the building and the colours used depended on the owner's class. Some commoners living in areas plagued by bandits built communal fortresses called Tulou for protection.