Refactor of packages