added support for data-type override; refactored sortComplexList and removed sortSimpleList