auto_mark.py update, clean up plus background subtraction