Decomposing Complex Programs