Use generators as opposed to callbacks (part 2)

Signed-off-by: Raul Gutierrez S <rgs@itevenworks.net>