Commented out debugging output and removed an unused function (writebs).