Added protocol encoder functions (not filled). Added debug messages and kill_sb function to be called when an instante of the filesystem should be shutdown.

x