Cosmetical: using only global variables
Controlling the parts where the library can be interrupted