Added optparse

Now parsing through optparse instead of sys.argv