for loop concatenation, rewrite the code.
  We need type information about the elements to be able to initialize the answer vector.

[Done] removeAfterReturn  should work recursively to process blocks within functions.

[Done] remove unused parameters

[Done] remove unused assignments if we can tell there are no side effects of the RHS.