refactor: move curl callbacks out of class scope