Refactor smart_element_or_specie to the simpler get_el_sp.