In the Middle Ages in the Holy Roman Empire, advanced works, known as Vorwerke (singular: Vorwerk), were commonly found in smaller villages that were located in front of the main castle. Within these advanced works often lived relatives of the knightly family whose ancestral seat was in the castle itself. As a result, the advanced works became manor houses and were known locally as schlosses. They were suitable for defending against minor attacks and offered the village population a degree of protection. In the case of major attacks they also acted as an early warning system for the castle. Because the advanced works were supposed to function autonomously, a link with agricultural estates was possible, such estates then became granges or vorwerkenden Gutshöfen. Later they also took over administrative tasks. Over the course of time these advanced works detached themselves from the castle and became independent estates.