COFFEE: move loop merger in a separate class
COFFEE: Reword some methods, improve comments