Added signed int32 sorting, split code up by type