Added new PkgMng class and logging facilities
Move to the new PkgMng APIs and reduce the complexity of apps