From Endogenous to Exogenous Coordination Using Aspect-Oriented Programming