Patterns of Modular Architecture