Added global command line arguments support

Also added main() and removed global variable.

Note: --family/-f is now the global arg -family

T70664
Change-Id: I41bc6b8175f34867cfe50c6b890892045c32b4c4
Merge "Added global command line arguments support"