Migrated to argparse, removed globals and allowed multiple encryption keys