code: func cleanHTML(r io.Reader, all bool) string {
  	output := ""
  	if !all {
  		output = "<html><head></head>"
  	}
  	mainSection := false
  	junkSection := false
  
  	d := html.NewTokenizer(r)
  	for {
  		// token type
  		tokenType := d.Next()
  		if tokenType == html.ErrorToken {
  			return output
  		}
  		token := d.Token()
  
  		switch tokenType {
  		case html.StartTagToken: // <tag>
  			if token.Data == "body" || (token.Data == "html" && all) {
  				mainSection = true
  			}
  			if !acceptedHTMLTag(token.Data) {
  				junkSection = true
  			}
  
  			if !junkSection && mainSection {
  				output += "<" + token.Data + ">"
  			}
  
  		case html.TextToken: // text between start and end tag
  			if !junkSection && mainSection {
  				output += token.Data
  			}
  
  		case html.EndTagToken: // </tag>
  			if !junkSection && mainSection {
  				output += "</" + token.Data + ">"
  			}
  			if !acceptedHTMLTag(token.Data) {
  				junkSection = false
  			}
  
  		case html.SelfClosingTagToken: // <tag/>
  			if !junkSection && mainSection {
  				output += "<" + token.Data + " />" // TODO: Can probably keep attributes from the meta tags
  			}
  		}
  	}
  }
docs: // Removes scripts, comments, styles and parameters from HTML.
  // Also removes made up tags, e.g. <fb:like>
  // Can keep head elements or not. Typically not much in there.