reorder imports, improve formatting