Refactor server package.