Add generic support for fragment types.

This PR needs CR + sanity check, i.e 'scons', KS.