Add more background subtraction functionality and some simple tests