Implemented hysteresis; fixed non-maximum suppression filter