Refactor the package