Copied more stuff from the old callback into the test component