Update 2

Implemented block matching in mex file; much faster.