Refactor names and add server state.