Extract package refactoring