Cleanup background substractino code