Removed retention of incorrect threshold when using local thresholding, minor changes to mbplot.py