Refactor code to minimise cross-package dependencies.
Refactor code to minimise cross-package dependencies.