Refactor the package structure