refactor server layout