Callbacks refactored to use error-first convention