Clean up legacy row-based code