add NewServer() and change config parsing a little more