added go vet.
refactor, extracting the server role.