Decompose large function.