[FUNCTOR-14] Merge branch generators-FUNCTOR-14. Adding the loop and range packages, and simplifying the BaseGenerator type.