server/shared package refactoring