Wrap to 80 cols, introduce main() function and use argparse instead of optparse.
mentioned in commit e0f70a8a