General refactoring to all packages