 		return template.render(context, delegate: parentheticalDelegate)
 	}
 	
-	
-	
+	// For now, this returns the English regex, but in the future it could be smarter.
 	private func getLocalRegex() -> NSRegularExpression {
 		return regex
 	}
 	
+	// Split template into plain string components (`<h1><span>`) and variables (`put title here`).
 	private func parseComponents(text: String) -> [TemplateComponent] {
 		let localRegex = getLocalRegex()
 		

		.stringByReplacingOccurrencesOfString("___•••amp•••___", withString:"&amp;")
}

func matchesForRegexInText(regex: NSRegularExpression, text: String) -> [String] {
	let nsString = text as NSString
	let results = regex.matchesInString(text,
										options: [], range: NSMakeRange(0, nsString.length))
	return results.map { nsString.substringWithRange($0.range)}
}

public class PutStuffHere : TemplateEngine {
	var parentheticalDelegate : ParentheticalDelegate? = nil
	
	var shouldExtractBody = true
	// The main regex. This can and should be extended with other syntaxes.
	private let regex = try! NSRegularExpression(pattern: "([\\s\\W]|^)(?:(?:put|insert)\\s+(.+?\\S)(?:\\s*\\(([^)]+)\\))?\\s+here)([\\W\\s]|$)", options: [.CaseInsensitive])

	private var templates : [String : SimpleTemplate] = [:]
	public init(){}
	
	// protocol getter
	public var fileExtension : String { return "html" }

		return components
	}
	
	// This is a pretty terrible method, but it works for now.
	private func extractBody(html: String) -> String {
		if html.containsString("<body") {
			let openTag = try! NSRegularExpression(pattern: "^.*?<body[^>]*>\\s*", options: [.CaseInsensitive, .DotMatchesLineSeparators])
