Server.go refactor