Added getopt for previous options. Added max/min options for 'passes' function. Cleaned up some comments