Fix first line case

And support negative prefix argument
improve wrap utilities