This isn't fully functional, as the callbacks aren't being triggered, although set. Needs some more investigation.