make argparse python 2.4 compatible
more refactoring