removed the Service class
rewrote Server with a new state machine
fixing small stuff, line endings