Server handler refactor.