YEAH, reduced this by almost 30 lines!

doesn't break any more since I included an exit() clause & switched around my if/elif/else stuff.  TOTALLY AWESOME.