add init for pkg import in 2.x, sort filters by key name

plus trailing whitespace cleanup