Move callback methods to its own class