Among the most important properties of software is 'modularity', the notion that you build complex modules from simpler ones. It is common practice to adhere to this concept in the context of logical components, such as separating an application into input, transformation, and output. Once we drill down into lower level details however, it can get a bit finicky to enforce the same kind of modularity. In this talk we will explore how we can build complex programs from simple building blocks regardless of the level we are working at, be it functions, modules, or (embedded) programs. Particularly, we will see how an expressive type system can be leveraged to keep our modularity in check as we build more and more complex modules. Examples will be given in Scala but techniques discussed are generally language agnostic.