Clean up statement editing UI; #597