Rename variables and simplify src/server