Refactoring Server, fix config