Created FunGen implementation (missing only pruning phase).