Import sbuf stuff.
Small fixes.