Fixed bug in new_decoder2 for binary and added debug layers to branch