Separates elements by types