Fixed background subtraction and began work on persistance