 	public init(_ string: String, pos: Transform = Transform()) {
 		xmlString = string
 		position = pos
+        availableShapes = [groupTag, pathTag, lineTag, rectTag, circleTag, ellipseTag, polygonTag, polylineTag]
 	}
 
 	public func parse() -> Group {

		}
		return width
	}

	private func parsePath(path: XMLIndexer) -> Path? {
		if let dAttr = path.element!.attributes["d"] {

	private func iterateThroughXmlTree(children: [XMLIndexer]) {
		for child in children {
			if let element = child.element {
                //TODO: dirty hack. Need to figure out <svg> nesting
                if element.name == "svg" {
                    iterateThroughXmlTree(child.children)
                } else if availableShapes.contains(element.name) {
                    if let node = parseNode(child) {
                        self.nodes.append(node)
                    }
                }
			}
		}
	}
    
    private func parseNode(node: XMLIndexer, groupStyle: [String: String] = [:]) -> Node? {
        if let element = node.element {
            if node.children.isEmpty {
                return parseShape(node, groupStyle: groupStyle)
            } else if element.name == groupTag {
                return parseGroup(node, groupStyle: groupStyle)
            }
        }
        return nil
    }
    
    private func parseShape(shape: XMLIndexer, groupStyle: [String: String] = [:]) -> Shape? {
        if let element = shape.element {
            let styleAttributes = getStyleAttributes(groupStyle, element: element)
            switch element.name {
            case pathTag:
                if let path = parsePath(shape) {
                    return Shape(form: path, fill: getFillColor(styleAttributes), stroke: getStroke(styleAttributes), pos: position)
                }
            case lineTag:
                if let line = parseLine(shape) {
                    return Shape(form: line, fill: getFillColor(styleAttributes), stroke: getStroke(styleAttributes), pos: position)
                }
            case rectTag:
                if let rect = parseRect(shape) {
                    return Shape(form: rect, fill: getFillColor(styleAttributes), stroke: getStroke(styleAttributes), pos: position)
                }
            case circleTag:
                if let circle = parseCircle(shape) {
                    return Shape(form: circle, fill: getFillColor(styleAttributes), stroke: getStroke(styleAttributes), pos: position)
                }
            case ellipseTag:
                if let ellipse = parseEllipse(shape) {
                    return Shape(form: ellipse, fill: getFillColor(styleAttributes), stroke: getStroke(styleAttributes), pos: position)
                }
            case polygonTag:
                if let polygon = parsePolygon(shape) {
                    return Shape(form: polygon, fill: getFillColor(styleAttributes), stroke: getStroke(styleAttributes), pos: position)
                }
            case polylineTag:
                if let polyline = parsePolyline(shape) {
                    return Shape(form: polyline, fill: getFillColor(styleAttributes), stroke: getStroke(styleAttributes), pos: position)
                }
            default:
                return nil
            }
        }
        return nil
    }

    private func parseGroup(group: XMLIndexer, groupStyle: [String: String] = [:]) -> Group? {
        guard let element = group.element else {
            return nil
        }
        var groupNodes: [Node] = []
        let groupStyle = getStyleAttributes(groupStyle, element: element)
        for child in group.children {
            if let node = parseNode(child, groupStyle: groupStyle) {
                groupNodes.append(node)
            }
        }
        return Group(contents: groupNodes)
    }
    
    private func getStyleAttributes(groupAttributes: [String: String], element: XMLElement) -> [String: String] {
        var styleAttributes: [String: String] = groupAttributes
        if let style = element.attributes["style"] {
            let styleParts = style.componentsSeparatedByString(";")
            for styleAttribute in styleParts {
                let currentStyle = styleAttribute.componentsSeparatedByString(":")
                if currentStyle.count == 2 {
                    styleAttributes.updateValue(currentStyle[1], forKey: currentStyle[0].stringByReplacingOccurrencesOfString(" ", withString: ""))
                }
            }
        } else {
            for availableAttribute in self.availableStyleAttributes {
                if let styleAttribute = element.attributes[availableAttribute] {
                    styleAttributes.updateValue(styleAttribute, forKey: availableAttribute)
                }
            }
        }
        return styleAttributes
    }

	private func createColor(hexString: String) -> Color {
		var cleanedHexString = hexString
