Updated (some of the?) callback mechanism and made corresponding changes to structures.