Callbacks moved to main method.