refactor server package structure