Add simply split-by-type function