Implemented logical bifs.
Additional bifs, fixed error in stack collapsing operation.
Got merge to work.