Refactoring of packages and selectors