Restructure callbacks