Sort and remove unused imports