Edit .gitignore to exclude MATLAB temp files
Change routine for node merging selection

Choose only same-class nodes for merging.