Rewrite impls to iterative from recusive. Map, from and filter incremental.