Small refactor on server