Add sorting by type.