Dwellings in the castle towns were highly regulated by the local lord. Particularly during the Edo Period with the fixed caste system instituted by the Tokugawa, all samurai kept their permanent home near the castle. These samurai quarters are called Bukeyashiki or Samuraiyashiki. In the samurai quarters, the proximity to the castle and the size of the home were respective to the samurai's rank and standing with his lord. Samurai homes were typically modest dwellings but with the significant distinction that only samurai houses were allowed to have walls and gates. Samurai residences were technically the property of the local lord so he could change the residence or rank of the samurai at will.