Next generation

This still needs some more minor debugging.