Connected thresholdfinding with antialiasing. Implemented much debugging functionality. It still needs to be tested with proper use of the threshold finding.