major rewrite with consisten interface, removed unused generators.