add .swp to .gitignore
multiple tiny cleanups
substitute optparse with argparse
bugfix
further cleanup