more package refactoring and test fixes