Further implementation of #113

Completely using generators now?