Reorder package import paragraphs and fix them up.