add NewServer; move all flags to daemon