Added two command line switches and some regex

Hi, I made some changes for specifics of my use that might be useful to others.