Moving sendhead to separate header.
Replacing flush with flags.