Switched to argparse instead of optparse