> the idea is to keep the code modular

Aha, like so. I suspected as much when I saw the later examples where more happens in close ;-)