removeAbove and removeBelow functions

These two commits add support for two new thresholding functions.