lib: fix function declarations
lib: remove cycle2 function

It was more an experiment, not really useful.