Kleene

This seems to work. However, I have not tested it thorougly. This patch is more like a place to start from in case you want to implement this feature in the future.