cleaning things up, adding output file options