Renamed setType() to setTypeData() to be more consistent