Updating with sbuffer fix, recommendations

Updating based on comments and
recommendations on pull request.
Modified sbuffer creation and some
more error msgs.