Simplify get_semantic_types, get code via split