Added type mapping back, changed split_rows so it's correct