Previously the background was subtracted using a mask, but at no point in the code could you stop it and say 'here is the mask', as it was all calculated in one rather large if statement. The code has now been extracted out to actually create a mask, which is then applied to the image during processing. This runs a bit slower because it's not particuarly efficient, but it allows other adjustments to be made to the mask easily. The first of these is... I forget the name, but essentially it removes strands of individual pixels, e.g. where a shadow fell along an edge, a subtle difference, but it helps.