restructure expand/callback mapping functions