Moved hostname and port to clientstate object