Change factorizer to use flat_map
Solve problem 23