Migrated to argparse, added import validation