added some comments
fixed bug in ApplyBcj()

wrong condition for indicating LastBuf.