Remove dependency on java8
Add List.foldLeft and simplify all mkAggregate
Add Lists support to `optimize` block