Decompose program into modules