Refactors the mock callback structure