Refactored a bit, added FlatMap Generator

It makes a flat map. This is useful for setting up other systems.