Refactor Server to rely less on boolean primitives