Use command with exclamation mark
Handle case with single import at end of file
Improve implementation of sortInsideGroups