Refactor package version management