removed useless getaurversion() call in MakePkgs()
code reorganization
code factorization