Index: cpp/frams/_demos/genooper_test.cpp
===================================================================
--- cpp/frams/_demos/genooper_test.cpp	(revision 972)
+++ cpp/frams/_demos/genooper_test.cpp	(revision 973)
@@ -1,4 +1,4 @@
 // This file is a part of Framsticks SDK.  http://www.framsticks.com/
-// Copyright (C) 1999-2015  Maciej Komosinski and Szymon Ulatowski.
+// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
 // See LICENSE.txt for details.
 
@@ -9,5 +9,5 @@
 {
 	printf("Genotype: %s\nFormat: %s\nValid: %s\nComment: %s\n",
-	        g.getGenes().c_str(), g.getFormat().c_str(), g.isValid() ? "yes" : "no", g.getComment().len() == 0 ? "(empty)" : g.getComment().c_str());
+		g.getGenes().c_str(), g.getFormat().c_str(), g.isValid() ? "yes" : "no", g.getComment().length() == 0 ? "(empty)" : g.getComment().c_str());
 }
 
Index: cpp/frams/_demos/loader_test_geno.cpp
===================================================================
--- cpp/frams/_demos/loader_test_geno.cpp	(revision 972)
+++ cpp/frams/_demos/loader_test_geno.cpp	(revision 973)
@@ -1,4 +1,4 @@
 // This file is a part of Framsticks SDK.  http://www.framsticks.com/
-// Copyright (C) 1999-2015  Maciej Komosinski and Szymon Ulatowski.
+// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
 // See LICENSE.txt for details.
 
@@ -20,5 +20,5 @@
 			"If a genotype is indicated (by providing the optional genotype identifier), the program will output the raw genotype, suitable for Framsticks Theater's genotype viewer mode. If a genotype and a field name is given, the field value (instead of the raw genotype) is printed. If the second argument is not given, the genotype names from the file will be listed.\n"
 			"Example: loader_test walking.gen \"Basic Quadruped\" | theater -g -\n"
-			);
+		);
 		return 1;
 	}
@@ -29,5 +29,5 @@
 	const char* selected = (argc < 3) ? NULL : argv[2];
 	const char* field_name = (argc < 4) ? NULL : argv[3];
-	int selected_index = (selected&&isdigit(selected[0])) ? atol(selected) : 0;
+	int selected_index = (selected && isdigit(selected[0])) ? atol(selected) : 0;
 	// using char* constructor (passing the file name to open)
 	GenotypeMini *loaded;
@@ -36,5 +36,5 @@
 		// loaded into MiniGenotype object
 		count++;
-		totalsize += loaded->genotype.len();
+		totalsize += loaded->genotype.length();
 		if (selected)
 		{
@@ -65,5 +65,5 @@
 			return 0;
 		}
-		fprintf(stderr, "%d. %s\t(%d characters)\n", count, loaded->name.c_str(), loaded->genotype.len());
+		fprintf(stderr, "%d. %s\t(%d characters)\n", count, loaded->name.c_str(), loaded->genotype.length());
 	}
 	// the loop repeats until loaded==NULL, which could be beacause of error
Index: cpp/frams/_demos/paramtree_stdin_test.cpp
===================================================================
--- cpp/frams/_demos/paramtree_stdin_test.cpp	(revision 972)
+++ cpp/frams/_demos/paramtree_stdin_test.cpp	(revision 973)
@@ -45,7 +45,7 @@
 	while (group_names.getNextToken(pos, line, '\n'))
 	{
-		if ((line.len() > 0) && (line[line.len() - 1] == '\r')) //support for reading \r\n files...
-			line = line.substr(0, line.len() - 1);
-		if (line.len() > 0 && line[0] != '#') //skip empty lines and #commment lines
+		if ((line.length() > 0) && (line[line.length() - 1] == '\r')) //support for reading \r\n files...
+			line = line.substr(0, line.length() - 1);
+		if (line.length() > 0 && line[0] != '#') //skip empty lines and #commment lines
 			param.addGroup(line.c_str());
 	}
Index: cpp/frams/_demos/printconvmap.cpp
===================================================================
--- cpp/frams/_demos/printconvmap.cpp	(revision 972)
+++ cpp/frams/_demos/printconvmap.cpp	(revision 973)
@@ -1,4 +1,4 @@
 // This file is a part of Framsticks SDK.  http://www.framsticks.com/
-// Copyright (C) 1999-2018  Maciej Komosinski and Szymon Ulatowski.
+// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
 // See LICENSE.txt for details.
 
@@ -48,5 +48,5 @@
 		return;
 	}
-	len1 = gen1.len();
+	len1 = gen1.length();
 	SString g1 = gen1;
 	stripstring(g1);
@@ -73,5 +73,5 @@
 			y2 = len1;
 		}
-		else	{
+		else {
 			id = map.findMappingId(y);
 			mr = &map.getMapping(id)->to;
@@ -80,5 +80,5 @@
 		if ((y2 - y) > left_column_padding) y2 = y + left_column_padding;
 		if (y2 > (y + len1)) y2 = y + len1;
-		printmapping(g + y, y2 - y, *mr, g2.c_str(), g2.len(), left_column_padding);
+		printmapping(g + y, y2 - y, *mr, g2.c_str(), g2.length(), left_column_padding);
 		y = y2;
 	}
Index: cpp/frams/_demos/simil_test.cpp
===================================================================
--- cpp/frams/_demos/simil_test.cpp	(revision 972)
+++ cpp/frams/_demos/simil_test.cpp	(revision 973)
@@ -1,4 +1,4 @@
 // This file is a part of Framsticks SDK.  http://www.framsticks.com/
-// Copyright (C) 1999-2016  Maciej Komosinski and Szymon Ulatowski.
+// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
 // See LICENSE.txt for details.
 
@@ -78,8 +78,8 @@
 		M.m_adFactors[i] = -1.0;
 	}
-	
+
 	iCurrParam++;
 	szCurrParam = argv[iCurrParam];
-	int measure_type = -1; 
+	int measure_type = -1;
 	nResult = sscanf(szCurrParam, "%d", &measure_type);
 	if (nResult != 1)
@@ -88,11 +88,11 @@
 		return -1;
 	}
-	
+
 	if (measure_type != 0 && measure_type != 1)
 	{
 		printf("Measure type should be 0 (flexible criteria order and optimal matching) or 1 (vertex degree order and greedy matching)!\n");
-		return -1;		
-	}
-	
+		return -1;
+	}
+
 	M.matching_method = measure_type;
 
@@ -150,5 +150,5 @@
 		// while a valid genotype was loaded
 		count++;
-		totalsize += loaded->genotype.len();
+		totalsize += loaded->genotype.length();
 		// create a Geno object based on the MiniGenotype
 		Geno *pNextGenotype = new Geno(loaded->genotype);
@@ -156,5 +156,5 @@
 		{
 			pvGenos.push_back(pNextGenotype);
-			char *szNewName = new char[loaded->name.len() + 1];
+			char *szNewName = new char[loaded->name.length() + 1];
 			strcpy(szNewName, loaded->name.c_str());
 			pvNames.push_back(szNewName);
Index: cpp/frams/canvas/neurodiagram.cpp
===================================================================
--- cpp/frams/canvas/neurodiagram.cpp	(revision 972)
+++ cpp/frams/canvas/neurodiagram.cpp	(revision 973)
@@ -1,4 +1,4 @@
 // This file is a part of Framsticks SDK.  http://www.framsticks.com/
-// Copyright (C) 1999-2017  Maciej Komosinski and Szymon Ulatowski.
+// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
 // See LICENSE.txt for details.
 
@@ -136,5 +136,5 @@
 		int *xywh = GetXYWH(el);
 		XY[0] = 0;
-		XY[1] = ((1 + i)*xywh[3]) / (GetInputs(el) + 1);
+		XY[1] = ((1 + i) * xywh[3]) / (GetInputs(el) + 1);
 		return XY;
 	}
@@ -230,6 +230,6 @@
 	if (i >= countNeurons()) return;
 	NeuroProbe *probe = new NeuroProbe(getNS(i));
-	Pixel s=getSize();
-	s.x=s.y=max(probe->getSize().x,min(s.x/3,s.y/3));
+	Pixel s = getSize();
+	s.x = s.y = max(probe->getSize().x, min(s.x / 3, s.y / 3));
 	probes += (void*)probe;
 	add(probe);
@@ -255,5 +255,5 @@
 	addNeuroDescription(tooltip, n);
 	label += n->getClassName();
-	if (n->getClassParams().len())
+	if (n->getClassParams().length())
 	{
 		tooltip += "\n"; tooltip += n->getClassParams();
@@ -319,5 +319,5 @@
 				*/
 
-	// NeuroSymbol is also responsible for drawing connection lines from its inputs to other NeuroSymbols' outputs
+				// NeuroSymbol is also responsible for drawing connection lines from its inputs to other NeuroSymbols' outputs
 	NeuroSymbol *ns2;
 	if (!diagram.isLive())
@@ -350,5 +350,5 @@
 			{
 				y2 = pos.y - yw / 3;
-				if ((ns2->pos.y<pos.y) && (ns2->pos.y>(pos.y - ns2->size.y))) y2 -= pos.y - ns2->pos.y;
+				if ((ns2->pos.y < pos.y) && (ns2->pos.y > (pos.y - ns2->size.y))) y2 -= pos.y - ns2->pos.y;
 			}
 			// note: "diagram" uses global coordinate system, so we add "pos" or "ns2->pos" to get NeuroSymbol's global positions
@@ -413,5 +413,5 @@
 int NeuroSymbol::inputY(int i)
 {
-	return (1 + i)*size.y / ((n->getInputCount()) + 1);
+	return (1 + i) * size.y / ((n->getInputCount()) + 1);
 }
 
@@ -421,23 +421,23 @@
 		if (x < size.x / 4)
 		{ // inputs?
-		if (n->getInputCount() > 0)
-		{
-			int i = (y*n->getInputCount()) / size.y;
-			double w;
-			Neuro* target = n->getInput(i, w);
-			if (target)
+			if (n->getInputCount() > 0)
 			{
-				SString t = "connected to #";
-				t += SString::valueOf((int)target->refno);
-				t += " - ";
-				addNeuroDescription(t, target);
-				//		if (w!=1.0)
+				int i = (y * n->getInputCount()) / size.y;
+				double w;
+				Neuro* target = n->getInput(i, w);
+				if (target)
 				{
-					t += ", weight=";
-					t += SString::valueOf(w);
+					SString t = "connected to #";
+					t += SString::valueOf((int)target->refno);
+					t += " - ";
+					addNeuroDescription(t, target);
+					//		if (w!=1.0)
+					{
+						t += ", weight=";
+						t += SString::valueOf(w);
+					}
+					return t;
 				}
-				return t;
 			}
-		}
 		}
 	return CanvasWindow::hint(x, y);
@@ -448,5 +448,5 @@
 NeuroProbe::NeuroProbe(NeuroSymbol* ns)
 	:DCanvasWindow(DCanvasWindow::Title + DCanvasWindow::Border + DCanvasWindow::Close + DCanvasWindow::Size,
-	ns->getLabel().c_str(), &neurochart, &neurochart)
+		ns->getLabel().c_str(), &neurochart, &neurochart)
 {
 	holdismine = 0;
@@ -515,6 +515,6 @@
 					while (*dr != NeuroImpl::ENDDRAWING)
 					{
-						int x = ((*(dr++))*scale) / (NeuroImpl::MAXDRAWINGXY + 1) + x0;
-						int y = ((*(dr++))*scale) / (NeuroImpl::MAXDRAWINGXY + 1) + y0;
+						int x = ((*(dr++)) * scale) / (NeuroImpl::MAXDRAWINGXY + 1) + x0;
+						int y = ((*(dr++)) * scale) / (NeuroImpl::MAXDRAWINGXY + 1) + y0;
 						if (first) { moveTo(x, y); first = 0; }
 						else lineTo(x, y);
@@ -577,5 +577,5 @@
 	{
 		double st = neurochart.unmapData(unmapClientY(y));
-		if (st<-1.0) st = -1.0; else if (st>1.0) st = 1.0;
+		if (st < -1.0) st = -1.0; else if (st > 1.0) st = 1.0;
 		if (chsel == 0)
 			link->n->state = st;
@@ -602,5 +602,5 @@
 		int sy = size.y;
 		if (chsel >= 0) sy -= textHeight();
-		return ((y<sy) && (y>(sy - textHeight())));
+		return ((y < sy) && (y > (sy - textHeight())));
 	}
 	return 0;
@@ -635,5 +635,5 @@
 		{
 			link->n->flags ^= Neuro::HoldState;
-			holdismine = ((link->n->flags&Neuro::HoldState) != 0);
+			holdismine = ((link->n->flags & Neuro::HoldState) != 0);
 			requestPaint();
 			return LeftButton;
@@ -645,6 +645,6 @@
 SString NeuroProbe::hint(int x, int y)
 {
-	if ((chsel >= 0) && (x<size.x - 16) && (y>size.y - 16))
-		return SString((link->n->flags&Neuro::HoldState) ? "Click to release" : "Click to hold");
+	if ((chsel >= 0) && (x < size.x - 16) && (y > size.y - 16))
+		return SString((link->n->flags & Neuro::HoldState) ? "Click to release" : "Click to hold");
 	else if (insideChSelector(x, y))
 		return SString::sprintf("channel %d of %d (click and drag to switch channels)", chsel, chnum);
Index: cpp/frams/genetics/f4/f4_general.cpp
===================================================================
--- cpp/frams/genetics/f4/f4_general.cpp	(revision 972)
+++ cpp/frams/genetics/f4/f4_general.cpp	(revision 973)
@@ -1,4 +1,4 @@
 // This file is a part of Framsticks SDK.  http://www.framsticks.com/
-// Copyright (C) 1999-2019  Maciej Komosinski and Szymon Ulatowski.
+// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
 // See LICENSE.txt for details.
 
@@ -1293,9 +1293,9 @@
 	if (2 == childCount())
 		if (0 == out[0]) out += ">"; else
-			if ('>' != out[out.len() - 1]) out += ">";
+			if ('>' != out[out.length() - 1]) out += ">";
 	if (NULL != child2)    child2->sprint(out);
 	// make sure last char is a '>'
 	if (0 == out[0]) out += ">"; else
-		if ('>' != out[out.len() - 1]) out += ">";
+		if ('>' != out[out.length() - 1]) out += ">";
 }
 
@@ -1310,5 +1310,5 @@
 
 	// very last '>' can be omitted
-	len = out.len();
+	len = out.length();
 	if (len > 1)
 		if ('>' == out[len - 1]) { (out.directWrite())[len - 1] = 0; out.endWrite(); };
Index: cpp/frams/genetics/f9/f9_conv.cpp
===================================================================
--- cpp/frams/genetics/f9/f9_conv.cpp	(revision 972)
+++ cpp/frams/genetics/f9/f9_conv.cpp	(revision 973)
@@ -1,4 +1,4 @@
 // This file is a part of Framsticks SDK.  http://www.framsticks.com/
-// Copyright (C) 1999-2018  Maciej Komosinski and Szymon Ulatowski.
+// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
 // See LICENSE.txt for details.
 
@@ -32,5 +32,5 @@
 	m.open(using_checkpoints);
 	int recently_added = addSegment(m, 0, vertices, current, 0xDead);
-	for (int i = 0; i < in.len(); i++)
+	for (int i = 0; i < in.length(); i++)
 	{
 		char command = in[i];
@@ -119,5 +119,5 @@
 	double d1 = ind - indpre;
 	double d2 = indpost - ind;
-	double v = indpre == indpost ? v1 : d2*v1 + d1*v2; //d1+d2==1
+	double v = indpre == indpost ? v1 : d2 * v1 + d1 * v2; //d1+d2==1
 	return v;
 }
@@ -136,5 +136,5 @@
 		Joint *j = m.getJoint(i);
 		double x = joints_count < 2 ? 0 : (double)i / (joints_count - 1); //0..1, postion in the rainbow
-		double ind = x*maxind;
+		double ind = x * maxind;
 		j->vcolor.x = mix(r, maxind, ind);
 		j->vcolor.y = mix(g, maxind, ind);
@@ -153,5 +153,5 @@
 			averagecolor += j->vcolor;
 		p->vcolor = averagecolor / count;
-		if (count>5) count = 5; //avoid too fat...
+		if (count > 5) count = 5; //avoid too fat...
 		p->vsize = 0.3 + count / 15.0; //the more Joints is attached to a Part, the fatter it is
 	}
@@ -169,5 +169,5 @@
 			((3 * i + 5) % 10) - 4.5,
 			((7 * i + 2) % 10) - 4.5
-			); //-4.5 .. 4.5 in each axis
+		); //-4.5 .. 4.5 in each axis
 		p->p += noise / 1000;
 	}
Index: cpp/frams/genetics/fB/fB_conv.cpp
===================================================================
--- cpp/frams/genetics/fB/fB_conv.cpp	(revision 972)
+++ cpp/frams/genetics/fB/fB_conv.cpp	(revision 973)
@@ -1,4 +1,4 @@
 // This file is a part of Framsticks SDK.  http://www.framsticks.com/
-// Copyright (C) 1999-2018  Maciej Komosinski and Szymon Ulatowski.
+// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
 // See LICENSE.txt for details.
 
@@ -80,5 +80,5 @@
 		int endoffset = 0;
 		if (gene.indexOf("zz", 0) != -1) endoffset = 2;
-		if (gene.len() - endoffset < 3)
+		if (gene.length() - endoffset < 3)
 		{
 			fH_StickHandle *handle = new fH_StickHandle(dims, start, end);
@@ -124,5 +124,5 @@
 		if (gene.indexOf("zz", 0) != -1) endoffset = 2;
 		int nclassdefcount = 1;
-		while (z < gene.len() - endoffset)
+		while (z < gene.length() - endoffset)
 		{
 			if (processNextLetter(creature, handle, par, gene, propindex, z, ranges, nclassdefcount) == -1)
@@ -185,6 +185,5 @@
 			}
 			nextid++;
-		}
-		while (genotype[nextid] == '"');
+		} while (genotype[nextid] == '"');
 		i = nextid;
 	}
Index: cpp/frams/genetics/fB/fB_general.h
===================================================================
--- cpp/frams/genetics/fB/fB_general.h	(revision 972)
+++ cpp/frams/genetics/fB/fB_general.h	(revision 973)
@@ -1,4 +1,4 @@
 // This file is a part of Framsticks SDK.  http://www.framsticks.com/
-// Copyright (C) 1999-2018  Maciej Komosinski and Szymon Ulatowski.
+// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
 // See LICENSE.txt for details.
 
@@ -35,5 +35,5 @@
 		do {
 			count++;
-			if (start < genotype.len())
+			if (start < genotype.length())
 				result = getNextGene(start, genotype, tmp, start);
 			else
@@ -52,5 +52,5 @@
 		do {
 			count++;
-			if (start < geno.len())
+			if (start < geno.length())
 				getNextGene(start, geno, tmp, start);
 			else
@@ -89,5 +89,5 @@
 		} while (quotecount % 2 != 0 && end != -1);
 
-		if (end == -1) end = genotype.len();
+		if (end == -1) end = genotype.length();
 		else end += 2;
 		start -= 1;
@@ -124,5 +124,5 @@
 		} while (quotecount % 2 != 0 && end != -1);
 
-		if (end == -1) end = genotype.len();
+		if (end == -1) end = genotype.length();
 		else end += 2;
 		start -= 1;
Index: cpp/frams/genetics/fB/fB_oper.cpp
===================================================================
--- cpp/frams/genetics/fB/fB_oper.cpp	(revision 972)
+++ cpp/frams/genetics/fB/fB_oper.cpp	(revision 973)
@@ -47,5 +47,5 @@
 		int endoffset = 0;
 		if (gene.indexOf("zz", 0) != -1) endoffset = 2;
-		if (gene.len() - endoffset < 3)
+		if (gene.length() - endoffset < 3)
 		{
 			return true; // genes with length < 3 are always sticks
@@ -83,5 +83,5 @@
 	}
 	// check if rest of characters are lowercase
-	for (int i = genstart; i < genotype.len(); i++)
+	for (int i = genstart; i < genotype.length(); i++)
 	{
 		if (!islower(genotype[i]))
@@ -144,5 +144,5 @@
 		fix = true;
 	}
-	for (int i = pos; i < genotype.len(); i++)
+	for (int i = pos; i < genotype.length(); i++)
 	{
 		// if character is not alphabetic - error
@@ -208,5 +208,5 @@
 	std::list<SString> res;
 	int i = 0;
-	while (i < genotype.len())
+	while (i < genotype.length())
 	{
 		// if character is not alphabetic - error
@@ -252,5 +252,5 @@
 		std::advance(it, rndid);
 		SString t = (*it);
-		if ((*it).len() == 1)
+		if ((*it).length() == 1)
 		{
 			if (rndUint(2) == 0)
@@ -264,5 +264,5 @@
 				else (*it).directWrite()[0] = (*it)[0] + 1;
 			}
-			chg = 1.0 / line.len();
+			chg = 1.0 / line.length();
 		}
 		else
@@ -270,5 +270,5 @@
 			// first method needs to extract quotes
 			SString def = (*it);
-			def = def.substr(1, def.len() - 2);
+			def = def.substr(1, def.length() - 2);
 			Geno_fH::mutateNeuronProperties(def);
 			SString res = "\"";
@@ -276,5 +276,5 @@
 			res += "\"";
 			(*it) = res;
-			chg = (double)def.len() / line.len();
+			chg = (double)def.length() / line.length();
 		}
 		line = detokenizeSequence(&tokenized);
@@ -296,5 +296,5 @@
 			res += "\"";
 			tokenized.insert(it, res);
-			chg = (double)classdef.len() / line.len();
+			chg = (double)classdef.length() / line.length();
 			line = detokenizeSequence(&tokenized);
 			break;
@@ -304,5 +304,5 @@
 	case FB_INSERTION:
 	{
-		chg = 1.0 / line.len();
+		chg = 1.0 / line.length();
 		std::list<SString> tokenized = tokenizeSequence(line);
 		int rndid = rndUint(tokenized.size()); // select random insertion point
@@ -317,5 +317,5 @@
 	case FB_DELETION:
 	{
-		chg = 1.0 / line.len();
+		chg = 1.0 / line.length();
 		std::list<SString> tokenized = tokenizeSequence(line);
 		std::list<SString>::iterator it = tokenized.begin();
@@ -332,5 +332,5 @@
 		SString gene = fB_GenoHelpers::getGene(rndgene, line, start, end);
 		if (gene.indexOf("zz", 0) == -1) gene += "zz";
-		chg = (float)gene.len() / line.len();
+		chg = (float)gene.length() / line.length();
 		line = gene + line;
 		break;
@@ -364,5 +364,5 @@
 		//			line.substr(cuts[1], cuts[2] - cuts[1]) + first + line.substr(cuts[3]);
 		line = detokenizeSequence(&res);
-		chg = (float)(cuts[3] - cuts[2] + cuts[1] - cuts[0]) / line.len();
+		chg = (float)(cuts[3] - cuts[2] + cuts[1] - cuts[0]) / line.length();
 		break;
 	}
@@ -412,10 +412,10 @@
 		// add this gene to the beginning of the second parent genotype
 		child2 = gene + parent2;
-		chg2 = (float)parent2.len() / (float)child2.len();
+		chg2 = (float)parent2.length() / (float)child2.length();
 		// do the same for second parent
 		choice = rndUint(fB_GenoHelpers::geneCount(parent2));
 		gene = fB_GenoHelpers::getGene(choice, parent2, start, end);
 		child1 = gene + parent1;
-		chg1 = (float)parent1.len() / (float)child1.len();
+		chg1 = (float)parent1.length() / (float)child1.length();
 		break;
 	}
@@ -523,5 +523,5 @@
 	free(g1);
 	free(g2);
-	if (child1.len() > 0 && child2.len() == 0)
+	if (child1.length() > 0 && child2.length() == 0)
 	{
 		child1 = strdims + "\n" + child1;
@@ -529,5 +529,5 @@
 		g2 = strdup("");
 	}
-	else if (child2.len() > 0 && child1.len() == 0)
+	else if (child2.length() > 0 && child1.length() == 0)
 	{
 		child2 = strdims + "\n" + child2;
Index: cpp/frams/genetics/fF/fF_genotype.h
===================================================================
--- cpp/frams/genetics/fF/fF_genotype.h	(revision 972)
+++ cpp/frams/genetics/fF/fF_genotype.h	(revision 973)
@@ -1,4 +1,4 @@
 // This file is a part of Framsticks SDK.  http://www.framsticks.com/
-// Copyright (C) 1999-2017  Maciej Komosinski and Szymon Ulatowski.
+// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
 // See LICENSE.txt for details.
 
@@ -36,5 +36,5 @@
 		SString s = serialized;
 		ParamInterface::LoadOptions opts;
-		return ((param.load(ParamInterface::FormatSingleLine, s, &opts) == param.getPropCount()) && (opts.offset == s.len()));
+		return ((param.load(ParamInterface::FormatSingleLine, s, &opts) == param.getPropCount()) && (opts.offset == s.length()));
 	}
 
Index: cpp/frams/genetics/fH/fH_general.cpp
===================================================================
--- cpp/frams/genetics/fH/fH_general.cpp	(revision 972)
+++ cpp/frams/genetics/fH/fH_general.cpp	(revision 973)
@@ -214,5 +214,5 @@
 	while (genotype.getNextToken(pos, line, '\n'))
 	{
-		if (line.len() > 0)
+		if (line.length() > 0)
 		{
 			int res = processLine(line, linenumber, lastpos, pos - 1);
Index: cpp/frams/genetics/fL/fL_general.cpp
===================================================================
--- cpp/frams/genetics/fL/fL_general.cpp	(revision 972)
+++ cpp/frams/genetics/fL/fL_general.cpp	(revision 973)
@@ -1,4 +1,4 @@
 // This file is a part of Framsticks SDK.  http://www.framsticks.com/
-// Copyright (C) 1999-2018  Maciej Komosinski and Szymon Ulatowski.
+// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
 // See LICENSE.txt for details.
 
@@ -76,8 +76,8 @@
 {
 	// if position exceeds length then return false
-	if (pos >= src.len()) return false;
+	if (pos >= src.length()) return false;
 	int opencount = -1;
 	int i = pos;
-	for (; i < src.len(); i++)
+	for (; i < src.length(); i++)
 	{
 		// token cannot contain branching parenthesis
@@ -169,5 +169,5 @@
 	SString temp;
 	temp = token.substr(tokpos);
-	temp = temp.substr(0, temp.len() - 1);
+	temp = temp.substr(0, temp.length() - 1);
 
 	// if word has parameters
@@ -199,5 +199,5 @@
 				// if string is empty, then evaluate this with 0
 				// if sequence could not be evaluated, then return error
-				if (seq.len() > 0)
+				if (seq.length() > 0)
 				{
 					eval = new MathEvaluation(numparams);
@@ -217,5 +217,5 @@
 		}
 	}
-	else if (word->npar == 0 && temp.len() > 0)
+	else if (word->npar == 0 && temp.length() > 0)
 	{
 		SString message = "Too many parameters for word:  ";
@@ -351,5 +351,5 @@
 {
 	// if word already exist, then return error
-	if (this->name.len() == 0)
+	if (this->name.length() == 0)
 	{
 		logMessage("fL_Word", "processDefinition", LOG_ERROR, "Axiom name is empty");
@@ -456,26 +456,26 @@
 	switch (type)
 	{
-		case fLElementType::TERM:
-		{
-			tab = fL_word_paramtab;
-			obj = new fL_Word();
-			break;
-		}
-		case fLElementType::INFO:
-		{
-			tab = fL_builder_paramtab;
-			obj = this;
-			break;
-		}
-		case fLElementType::RULE:
-		{
-			tab = fL_rule_paramtab;
-			obj = new fL_Rule(begin, end);
-			break;
-		}
-		default:
-			tab = NULL;
-			obj = NULL;
-			break;
+	case fLElementType::TERM:
+	{
+		tab = fL_word_paramtab;
+		obj = new fL_Word();
+		break;
+	}
+	case fLElementType::INFO:
+	{
+		tab = fL_builder_paramtab;
+		obj = this;
+		break;
+	}
+	case fLElementType::RULE:
+	{
+		tab = fL_rule_paramtab;
+		obj = new fL_Rule(begin, end);
+		break;
+	}
+	default:
+		tab = NULL;
+		obj = NULL;
+		break;
 	}
 	Param par(tab);
@@ -573,5 +573,5 @@
 	while (genotype.getNextToken(pos, line, '\n'))
 	{
-		if (line.len() > 0)
+		if (line.length() > 0)
 		{
 			// words can be defined in the beginning of genotype
@@ -851,5 +851,5 @@
 				{
 					SString t = par.getString(q);
-					if (t.len() > 0)
+					if (t.length() > 0)
 					{
 						fL_Word *attrword = NULL;
@@ -957,5 +957,5 @@
 		}
 		double partprop = (ppar.getDoubleById(fL_part_names[i]) * alterationcount +
-				currval) / (alterationcount + 1.0);
+			currval) / (alterationcount + 1.0);
 		ppar.setDoubleById(fL_part_names[i], partprop);
 	}
@@ -1097,5 +1097,5 @@
 						delete newpart;
 						logMessage("fL_Builder", "developModel", LOG_ERROR,
-								"Error parsing word parameter");
+							"Error parsing word parameter");
 						return 1;
 					}
@@ -1124,5 +1124,5 @@
 						{
 							logMessage("fL_Builder", "developModel", LOG_ERROR,
-									"Error parsing word parameter");
+								"Error parsing word parameter");
 							delete newjoint;
 							return 1;
@@ -1162,5 +1162,5 @@
 			else if (word->name == "C")
 			{
-				connsbuffer.push_back({w, currstate.currneuron});
+				connsbuffer.push_back({ w, currstate.currneuron });
 			}
 			else if (word->name.startsWith("rot"))
@@ -1182,13 +1182,13 @@
 				if (word->name == "rotX")
 				{
-					rotmatrix.rotate(Pt3D(rot,0,0));
+					rotmatrix.rotate(Pt3D(rot, 0, 0));
 				}
 				else if (word->name == "rotY")
 				{
-					rotmatrix.rotate(Pt3D(0,rot,0));
+					rotmatrix.rotate(Pt3D(0, rot, 0));
 				}
 				else if (word->name == "rotZ")
 				{
-					rotmatrix.rotate(Pt3D(0,0,rot));
+					rotmatrix.rotate(Pt3D(0, 0, rot));
 				}
 				currstate.direction = rotmatrix.transform(currstate.direction);
@@ -1212,5 +1212,5 @@
 	{
 		if (connsbuffer[i].second == NULL ||
-				(connsbuffer[i].second->getClass()->getPreferredInputs() != -1 &&
+			(connsbuffer[i].second->getClass()->getPreferredInputs() != -1 &&
 				connsbuffer[i].second->getInputCount() >=
 				connsbuffer[i].second->getClass()->getPreferredInputs()))
@@ -1225,5 +1225,5 @@
 			SString attr = par.getStringById(FL_PE_CONN_ATTR);
 			fL_Word *attractor = NULL;
-			if (attr.len() > 0)
+			if (attr.length() > 0)
 			{
 				createWord(attr, attractor, 0, (*connsbuffer[i].first)->begin, (*connsbuffer[i].first)->end);
@@ -1236,5 +1236,5 @@
 				{
 					logMessage("fL_Builder", "developModel", LOG_ERROR,
-							"Error parsing word parameter");
+						"Error parsing word parameter");
 					delete attractor;
 					return 1;
@@ -1245,6 +1245,6 @@
 				connsbuffer[i].second->addInput(neu, weight);
 				if (using_mapping) neu->addMapping(
-						IRange((*connsbuffer[i].first)->begin,
-								(*connsbuffer[i].first)->end));
+					IRange((*connsbuffer[i].first)->begin,
+						(*connsbuffer[i].first)->end));
 			}
 			else
@@ -1252,6 +1252,6 @@
 				connsbuffer[i].second->addInput(connsbuffer[i].second, weight);
 				if (using_mapping) neu->addMapping(
-						IRange((*connsbuffer[i].first)->begin,
-								(*connsbuffer[i].first)->end));
+					IRange((*connsbuffer[i].first)->begin,
+						(*connsbuffer[i].first)->end));
 			}
 			delete attractor;
@@ -1286,5 +1286,5 @@
 	m->open(using_checkpoints);
 	bool wordsexceeded = false;
-	for (; t <= time; t+= timestamp)
+	for (; t <= time; t += timestamp)
 	{
 		alterTimedProperties(t); // always alter timed properties in the beginning
@@ -1293,5 +1293,5 @@
 		{
 			iterate(t);
-			curriter+=1.0;
+			curriter += 1.0;
 		}
 		if (using_checkpoints)
@@ -1362,5 +1362,5 @@
 {
 	int count = genotype.size();
-	for (fL_Rule *rul: rules)
+	for (fL_Rule *rul : rules)
 	{
 		count += rul->objsucc.size();
@@ -1373,5 +1373,5 @@
 {
 	for (std::vector<fL_Rule *>::iterator it = rules.begin();
-			it != rules.end(); it++)
+		it != rules.end(); it++)
 	{
 		std::vector<fL_Rule *>::iterator it2 = it;
@@ -1393,5 +1393,5 @@
 				{
 					if ((*it)->condeval->getStringifiedRPN() ==
-							(*it2)->condeval->getStringifiedRPN())
+						(*it2)->condeval->getStringifiedRPN())
 					{
 						todelete = true;
Index: cpp/frams/genetics/fL/fL_oper.cpp
===================================================================
--- cpp/frams/genetics/fL/fL_oper.cpp	(revision 972)
+++ cpp/frams/genetics/fL/fL_oper.cpp	(revision 973)
@@ -285,93 +285,87 @@
 	switch (method)
 	{
-		case FL_CHG_ITER:
-		{
-			if (rndUint(2) == 0)
-			{
-				creature->time = creature->time + iterchangestep <= ExtValue::getDouble(FL_MAXITER) ?
-						creature->time + iterchangestep : creature->time - iterchangestep;
-			}
-			else
-			{
-				creature->time = creature->time - iterchangestep >= 0 ?
-						creature->time - iterchangestep : creature->time + iterchangestep;
-			}
+	case FL_CHG_ITER:
+	{
+		if (rndUint(2) == 0)
+		{
+			creature->time = creature->time + iterchangestep <= ExtValue::getDouble(FL_MAXITER) ?
+				creature->time + iterchangestep : creature->time - iterchangestep;
+		}
+		else
+		{
+			creature->time = creature->time - iterchangestep >= 0 ?
+				creature->time - iterchangestep : creature->time + iterchangestep;
+		}
+		break;
+	}
+	case FL_CHG_COND:
+	{
+		if (creature->rules.size() > 0)
+		{
+			int ruleid = rndUint(creature->rules.size());
+			if (!creature->rules[ruleid]->condeval)
+			{
+				creature->rules[ruleid]->condeval = new MathEvaluation(creature->rules[ruleid]->objpred->npar);
+			}
+			creature->rules[ruleid]->condeval->mutateConditional();
 			break;
 		}
-		case FL_CHG_COND:
-		{
-			if (creature->rules.size() > 0)
-			{
-				int ruleid = rndUint(creature->rules.size());
-				if (!creature->rules[ruleid]->condeval)
-				{
-					creature->rules[ruleid]->condeval = new MathEvaluation(creature->rules[ruleid]->objpred->npar);
-				}
-				creature->rules[ruleid]->condeval->mutateConditional();
-				break;
-			}
-			// if there are no rules - create one
-		}
-		[[fallthrough]];
-		case FL_ADD_RULE:
-		{
-			std::unordered_map<std::string, fL_Word *>::iterator pred = creature->words.begin();
-			std::vector<fL_Word *> wordswithnorules;
-			for (; pred != creature->words.end(); pred++)
-			{
-				if (!pred->second->builtin)
-				{
-					bool norules = true;
-					for (fL_Rule * r : creature->rules)
-					{
-						if (pred->second->name == r->objpred->name &&
-								pred->second->npar == r->objpred->npar)
-						{
-							norules = false;
-							break;
-						}
-					}
-					if (norules)
-					{
-						wordswithnorules.push_back(pred->second);
-					}
-				}
-			}
-			if (wordswithnorules.size() > 0)
-			{
-				int predid = rndUint(wordswithnorules.size());
-				fL_Rule *newrule = new fL_Rule(0,0);
-				fL_Word *pred = new fL_Word();
-				*pred = *wordswithnorules[predid];
-				newrule->objpred = pred;
-				fL_Word *initdef = randomWordDefinition(creature, roulette(addtypes, FL_ADD_COUNT - 1)); // -1 to avoid branching
-				addWord(&newrule->objsucc, initdef, newrule->objsucc.begin());
-				creature->rules.push_back(newrule);
-				break;
-			}
-			else if (creature->rules.size() > 0)
-			{
-				int ruleid = rndUint(creature->rules.size());
-				fL_Rule *newrule = new fL_Rule(0, 0);
-				fL_Word *pred = new fL_Word();
-				*pred = *creature->rules[ruleid]->objpred;
-				newrule->objpred = pred;
-				if (creature->rules[ruleid]->condeval)
-				{
-					std::string formula = "";
-					creature->rules[ruleid]->condeval->RPNToInfix(formula);
-					if (formula.find("1.0-(") != 0)
-					{
-						std::string res = "1.0-(";
-						res += formula;
-						res += ")";
-						newrule->condeval = new MathEvaluation(pred->npar);
-						newrule->condeval->convertString(res);
-					}
-					else
-					{
-						newrule->condeval = new MathEvaluation(pred->npar);
-						newrule->condeval->mutateConditional();
-					}
+		// if there are no rules - create one
+	}
+	[[fallthrough]];
+	case FL_ADD_RULE:
+	{
+		std::unordered_map<std::string, fL_Word *>::iterator pred = creature->words.begin();
+		std::vector<fL_Word *> wordswithnorules;
+		for (; pred != creature->words.end(); pred++)
+		{
+			if (!pred->second->builtin)
+			{
+				bool norules = true;
+				for (fL_Rule * r : creature->rules)
+				{
+					if (pred->second->name == r->objpred->name &&
+						pred->second->npar == r->objpred->npar)
+					{
+						norules = false;
+						break;
+					}
+				}
+				if (norules)
+				{
+					wordswithnorules.push_back(pred->second);
+				}
+			}
+		}
+		if (wordswithnorules.size() > 0)
+		{
+			int predid = rndUint(wordswithnorules.size());
+			fL_Rule *newrule = new fL_Rule(0, 0);
+			fL_Word *pred = new fL_Word();
+			*pred = *wordswithnorules[predid];
+			newrule->objpred = pred;
+			fL_Word *initdef = randomWordDefinition(creature, roulette(addtypes, FL_ADD_COUNT - 1)); // -1 to avoid branching
+			addWord(&newrule->objsucc, initdef, newrule->objsucc.begin());
+			creature->rules.push_back(newrule);
+			break;
+		}
+		else if (creature->rules.size() > 0)
+		{
+			int ruleid = rndUint(creature->rules.size());
+			fL_Rule *newrule = new fL_Rule(0, 0);
+			fL_Word *pred = new fL_Word();
+			*pred = *creature->rules[ruleid]->objpred;
+			newrule->objpred = pred;
+			if (creature->rules[ruleid]->condeval)
+			{
+				std::string formula = "";
+				creature->rules[ruleid]->condeval->RPNToInfix(formula);
+				if (formula.find("1.0-(") != 0)
+				{
+					std::string res = "1.0-(";
+					res += formula;
+					res += ")";
+					newrule->condeval = new MathEvaluation(pred->npar);
+					newrule->condeval->convertString(res);
 				}
 				else
@@ -380,180 +374,211 @@
 					newrule->condeval->mutateConditional();
 				}
-				fL_Word *worddef = randomWordDefinition(creature, roulette(addtypes, FL_ADD_COUNT - 1));
-				addWord(&newrule->objsucc, worddef, newrule->objsucc.begin());
-				creature->rules.push_back(newrule);
-				break;
-			}
-			// if there are no words, from which rules can be formed, then add one
-		}
-		[[fallthrough]];
-		case FL_ADD_WDEF:
-		{
-			if (creature->countDefinedWords() <= maxdefinedwords)
-			{
-				int npar = rndUint(ExtValue::getInt(FL_MAXPARAMS, false));
-				for (int i = 0; i < maxdefinedwords; i++)
-				{
-					std::string name = "w";
-					name += std::to_string(i);
-					if (creature->words.find(name) == creature->words.end())
-					{
-						fL_Word *word = new fL_Word(false, 0, 0);
-						word->npar = npar;
-						word->name = name.c_str();
-						word->processDefinition(creature);
-						break;
-					}
-				}
-				break;
-			}
-			//no break at the end of case - if there is too many words, then
-			// deletion should be performed
-		}
-		[[fallthrough]];
-		case FL_DEL_WORD:
-		{
+			}
+			else
+			{
+				newrule->condeval = new MathEvaluation(pred->npar);
+				newrule->condeval->mutateConditional();
+			}
+			fL_Word *worddef = randomWordDefinition(creature, roulette(addtypes, FL_ADD_COUNT - 1));
+			addWord(&newrule->objsucc, worddef, newrule->objsucc.begin());
+			creature->rules.push_back(newrule);
+			break;
+		}
+		// if there are no words, from which rules can be formed, then add one
+	}
+	[[fallthrough]];
+	case FL_ADD_WDEF:
+	{
+		if (creature->countDefinedWords() <= maxdefinedwords)
+		{
+			int npar = rndUint(ExtValue::getInt(FL_MAXPARAMS, false));
+			for (int i = 0; i < maxdefinedwords; i++)
+			{
+				std::string name = "w";
+				name += std::to_string(i);
+				if (creature->words.find(name) == creature->words.end())
+				{
+					fL_Word *word = new fL_Word(false, 0, 0);
+					word->npar = npar;
+					word->name = name.c_str();
+					word->processDefinition(creature);
+					break;
+				}
+			}
+			break;
+		}
+		//no break at the end of case - if there is too many words, then
+		// deletion should be performed
+	}
+	[[fallthrough]];
+	case FL_DEL_WORD:
+	{
+		int numpars = 0;
+		int ruleid = 0;
+		std::list<fL_Word *> *list = selectRandomSequence(creature, numpars, ruleid);
+		if (ruleid == -1 && creature->countSticksInSequence(list) == 1)
+		{
+			if (list->size() > 1)
+			{
+				int rndid = rndUint(list->size() - 1);
+				int j = 0;
+				std::list<fL_Word *>::iterator it = list->begin();
+				if ((*it)->name == "S")
+				{
+					it++;
+				}
+				while (it != list->end() && j < rndid && ((*it)->name == "S"))
+				{
+					if ((*it)->name != "S")
+					{
+						j++;
+					}
+					it++;
+				}
+				if (it != list->end())
+				{
+					if ((*it)->type == fLElementType::BRANCH)
+					{
+						deleteBranch(list, it);
+					}
+					else
+					{
+						delete (*it);
+						list->erase(it);
+					}
+					break;
+				}
+				// else add word
+			}
+			// else add word
+		}
+		else
+		{
+			int rndid = rndUint(list->size());
+			std::list<fL_Word *>::iterator it = list->begin();
+			std::advance(it, rndid);
+			if ((*it)->type == fLElementType::BRANCH)
+			{
+				deleteBranch(list, it);
+			}
+			else
+			{
+				delete (*it);
+				list->erase(it);
+			}
+			if (ruleid > -1 && creature->rules[ruleid]->objsucc.size() == 0)
+			{
+				delete creature->rules[ruleid];
+				creature->rules.erase(creature->rules.begin() + ruleid);
+			}
+			break;
+		}
+		// if no words available, then add word
+	}
+	[[fallthrough]];
+	case FL_ADD_WORD:
+	{
+		int numpars = 0;
+		int tmp = 0;
+		std::list<fL_Word *> *list = selectRandomSequence(creature, numpars, tmp);
+		int rndid = rndUint(list->size());
+		std::list<fL_Word *>::iterator it = list->begin();
+		std::advance(it, rndid);
+		int meth = roulette(addtypes, FL_ADD_COUNT);
+		if (tmp == -1)
+		{ // if sequence is axiom and it does not have non-builtin words
+			bool hasdefined = false;
+			for (std::list<fL_Word *>::iterator elem = list->begin(); elem != list->end(); elem++)
+			{
+				if (!(*elem)->builtin)
+				{
+					hasdefined = true;
+					break;
+				}
+			}
+			if (!hasdefined)
+			{
+				meth = FL_ADD_OTHER;
+			}
+
+		}
+		if (meth != FL_ADD_BRANCH)
+		{
+			fL_Word *worddef = randomWordDefinition(creature, meth);
+			addWord(list, worddef, it);
+		}
+		else
+		{
+			fL_Branch *start = new fL_Branch(fL_Branch::BranchType::OPEN, 0, 0);
+			list->insert(it, start);
+			int rottype = rndUint(2);
+			switch (rottype)
+			{
+			case 0:
+				addWord(list, creature->words["rotY"], it);
+			case 1:
+				addWord(list, creature->words["rotZ"], it);
+			}
+			addWord(list, creature->words["S"], it);
+			fL_Branch *end = new fL_Branch(fL_Branch::BranchType::CLOSE, 0, 0);
+			list->insert(it, end);
+		}
+		break;
+	}
+	case FL_CHG_WORD:
+	{
+		int numpars = 0;
+		int tmp = 0;
+		std::list<fL_Word *> *list = selectRandomSequence(creature, numpars, tmp);
+		int rndid = rndUint(list->size());
+		std::list<fL_Word *>::iterator selectedword = list->begin();
+		std::advance(selectedword, rndid);
+		if ((*selectedword)->type == fLElementType::BRANCH)
+		{
+			break;
+		}
+		int chgtype = roulette(chgoperations, FL_CHG_COUNT);
+		if (creature->countSticksInSequence(list) == 1 && tmp == -1) // if sequence is axiom
+		{
+			fL_Word *worddef = randomWordDefinition(creature, roulette(addtypes, FL_ADD_COUNT - 1));
+
 			int numpars = 0;
-			int ruleid = 0;
-			std::list<fL_Word *> *list = selectRandomSequence(creature, numpars, ruleid);
-			if (ruleid == -1 && creature->countSticksInSequence(list) == 1)
-			{
-				if (list->size() > 1)
-				{
-					int rndid = rndUint(list->size() - 1);
-					int j = 0;
-					std::list<fL_Word *>::iterator it = list->begin();
-					if ((*it)->name == "S")
-					{
-						it++;
-					}
-					while (it != list->end() && j < rndid && ((*it)->name == "S"))
-					{
-						if ((*it)->name != "S")
-						{
-							j++;
-						}
-						it++;
-					}
-					if (it != list->end())
-					{
-						if ((*it)->type == fLElementType::BRANCH)
-						{
-							deleteBranch(list, it);
-						}
-						else
-						{
-							delete (*it);
-							list->erase(it);
-						}
-						break;
-					}
-					// else add word
-				}
-				// else add word
-			}
-			else
-			{
-				int rndid = rndUint(list->size());
-				std::list<fL_Word *>::iterator it = list->begin();
-				std::advance(it, rndid);
-				if ((*it)->type == fLElementType::BRANCH)
-				{
-					deleteBranch(list, it);
-				}
-				else
-				{
-					delete (*it);
-					list->erase(it);
-				}
-				if (ruleid > -1 && creature->rules[ruleid]->objsucc.size() == 0)
-				{
-					delete creature->rules[ruleid];
-					creature->rules.erase(creature->rules.begin() + ruleid);
-				}
-				break;
-			}
-			// if no words available, then add word
-		}
-		[[fallthrough]];
-		case FL_ADD_WORD:
-		{
-			int numpars = 0;
-			int tmp = 0;
 			std::list<fL_Word *> *list = selectRandomSequence(creature, numpars, tmp);
 			int rndid = rndUint(list->size());
 			std::list<fL_Word *>::iterator it = list->begin();
 			std::advance(it, rndid);
-			int meth = roulette(addtypes, FL_ADD_COUNT);
-			if (tmp == -1)
-			{ // if sequence is axiom and it does not have non-builtin words
-				bool hasdefined = false;
-				for (std::list<fL_Word *>::iterator elem = list->begin(); elem != list->end(); elem++)
-				{
-					if (!(*elem)->builtin)
-					{
-						hasdefined = true;
-						break;
-					}
-				}
-				if (!hasdefined)
-				{
-					meth = FL_ADD_OTHER;
-				}
-
-			}
-			if (meth != FL_ADD_BRANCH)
-			{
-				fL_Word *worddef = randomWordDefinition(creature, meth);
-				addWord(list, worddef, it);
+
+			addWord(list, worddef, it);
+
+			break;
+		}
+		else if (chgtype == FL_CHG_WORD_NAME)
+		{
+			if ((*selectedword)->builtin)
+			{
+				delete (*selectedword);
+				selectedword = list->erase(selectedword);
+				fL_Word *worddef = randomWordDefinition(creature, roulette(addtypes, FL_ADD_COUNT - 1));
+				addWord(list, worddef, selectedword);
 			}
 			else
 			{
-				fL_Branch *start = new fL_Branch(fL_Branch::BranchType::OPEN, 0, 0);
-				list->insert(it, start);
-				int rottype = rndUint(2);
-				switch (rottype)
-				{
-				case 0:
-					addWord(list, creature->words["rotY"], it);
-				case 1:
-					addWord(list, creature->words["rotZ"], it);
-				}
-				addWord(list, creature->words["S"], it);
-				fL_Branch *end = new fL_Branch(fL_Branch::BranchType::CLOSE, 0, 0);
-				list->insert(it, end);
-			}
-			break;
-		}
-		case FL_CHG_WORD:
-		{
-			int numpars = 0;
-			int tmp = 0;
-			std::list<fL_Word *> *list = selectRandomSequence(creature, numpars, tmp);
-			int rndid = rndUint(list->size());
-			std::list<fL_Word *>::iterator selectedword = list->begin();
-			std::advance(selectedword, rndid);
-			if ((*selectedword)->type == fLElementType::BRANCH)
-			{
-				break;
-			}
-			int chgtype = roulette(chgoperations, FL_CHG_COUNT);
-			if (creature->countSticksInSequence(list) == 1 && tmp == -1) // if sequence is axiom
-			{
-				fL_Word *worddef = randomWordDefinition(creature, roulette(addtypes, FL_ADD_COUNT - 1));
-
-				int numpars = 0;
-				std::list<fL_Word *> *list = selectRandomSequence(creature, numpars, tmp);
-				int rndid = rndUint(list->size());
-				std::list<fL_Word *>::iterator it = list->begin();
-				std::advance(it, rndid);
-
-				addWord(list, worddef, it);
-
-				break;
-			}
-			else if (chgtype == FL_CHG_WORD_NAME)
-			{
-				if ((*selectedword)->builtin)
+				std::vector<fL_Word *> available;
+				for (std::unordered_map<std::string, fL_Word *>::iterator wit = creature->words.begin();
+					wit != creature->words.end(); wit++)
+				{
+					if ((*selectedword)->npar == wit->second->npar &&
+						(*selectedword)->name != wit->second->name &&
+						!wit->second->builtin)
+					{
+						available.push_back(wit->second);
+					}
+				}
+				if (available.size() > 0)
+				{
+					int newnameid = rndUint(available.size());
+					(*selectedword)->name = available[newnameid]->name;
+				}
+				else
 				{
 					delete (*selectedword);
@@ -562,114 +587,89 @@
 					addWord(list, worddef, selectedword);
 				}
-				else
-				{
-					std::vector<fL_Word *> available;
-					for (std::unordered_map<std::string, fL_Word *>::iterator wit = creature->words.begin();
-							wit != creature->words.end(); wit++)
-					{
-						if ((*selectedword)->npar == wit->second->npar &&
-								(*selectedword)->name != wit->second->name &&
-								!wit->second->builtin)
+			}
+		}
+		else
+		{
+			if ((*selectedword)->npar > 0)
+			{
+				int randeval = rndUint((*selectedword)->npar);
+				Param par((*selectedword)->tab, (*selectedword)->data);
+				if ((*selectedword)->builtin && (*selectedword)->name == "N"
+					&& strcmp(par.id(randeval), FL_PE_NEURO_DET) == 0)
+				{
+					SString res = par.getStringById(FL_PE_NEURO_DET);
+					Geno_fH::mutateNeuronProperties(res);
+					par.setStringById(FL_PE_NEURO_DET, res);
+				}
+				else if ((*selectedword)->builtin &&
+					(*selectedword)->name == "C" &&
+					strcmp(par.id(randeval), FL_PE_CONN_ATTR) == 0)
+				{
+					SString strattractor = par.getStringById(FL_PE_CONN_ATTR);
+					if (strattractor.length() > 0)
+					{
+						fL_Word *w = NULL;
+						creature->createWord(strattractor, w, numpars, 0, 0);
+						// mutate attractor parameter
+						if (w->npar > 0)
 						{
-							available.push_back(wit->second);
+							int rndattr = rndUint(w->npar);
+							if (!w->parevals[rndattr])
+							{
+								w->parevals[rndattr] = new MathEvaluation(numpars);
+							}
+							w->parevals[rndattr]->mutate(false, false);
 						}
-					}
-					if (available.size() > 0)
-					{
-						int newnameid = rndUint(available.size());
-						(*selectedword)->name = available[newnameid]->name;
+						strattractor = w->stringify(true);
+						par.setStringById(FL_PE_CONN_ATTR, strattractor);
+						delete w;
 					}
 					else
 					{
-						delete (*selectedword);
-						selectedword = list->erase(selectedword);
-						fL_Word *worddef = randomWordDefinition(creature, roulette(addtypes, FL_ADD_COUNT - 1));
-						addWord(list, worddef, selectedword);
-					}
-				}
-			}
-			else
-			{
-				if ((*selectedword)->npar > 0)
-				{
-					int randeval = rndUint((*selectedword)->npar);
-					Param par((*selectedword)->tab, (*selectedword)->data);
-					if ((*selectedword)->builtin && (*selectedword)->name == "N"
-							&& strcmp(par.id(randeval), FL_PE_NEURO_DET) == 0)
-					{
-						SString res = par.getStringById(FL_PE_NEURO_DET);
-						Geno_fH::mutateNeuronProperties(res);
-						par.setStringById(FL_PE_NEURO_DET, res);
-					}
-					else if ((*selectedword)->builtin &&
-							(*selectedword)->name == "C" &&
-							strcmp(par.id(randeval), FL_PE_CONN_ATTR) == 0)
-					{
-						SString strattractor = par.getStringById(FL_PE_CONN_ATTR);
-						if (strattractor.len() > 0)
+						if (creature->builtincount < (int)creature->words.size())
 						{
-							fL_Word *w = NULL;
-							creature->createWord(strattractor, w, numpars, 0, 0);
-							// mutate attractor parameter
+							fL_Word *wdef = randomWordDefinition(creature, FL_ADD_OTHER);
+							fL_Word *w = new fL_Word();
+							*w = *wdef;
+							w->data = ParamObject::makeObject(w->tab);
+							Param apar(w->tab);
+							apar.select(w->data);
+							apar.setDefault();
 							if (w->npar > 0)
 							{
 								int rndattr = rndUint(w->npar);
-								if (!w->parevals[rndattr])
+								for (int i = 0; i < w->npar; i++)
 								{
-									w->parevals[rndattr] = new MathEvaluation(numpars);
+									if (i == rndattr)
+									{
+										MathEvaluation *ev = new MathEvaluation(numpars);
+										ev->mutate(false, false);
+										w->parevals.push_back(ev);
+									}
+									else
+									{
+										w->parevals.push_back(NULL);
+									}
 								}
-								w->parevals[rndattr]->mutate(false, false);
+
 							}
-							strattractor = w->stringify(true);
+							strattractor = w->stringify(false);
 							par.setStringById(FL_PE_CONN_ATTR, strattractor);
 							delete w;
 						}
-						else
-						{
-							if (creature->builtincount < (int)creature->words.size())
-							{
-								fL_Word *wdef = randomWordDefinition(creature, FL_ADD_OTHER);
-								fL_Word *w = new fL_Word();
-								*w = *wdef;
-								w->data = ParamObject::makeObject(w->tab);
-								Param apar(w->tab);
-								apar.select(w->data);
-								apar.setDefault();
-								if (w->npar > 0)
-								{
-									int rndattr = rndUint(w->npar);
-									for (int i = 0; i < w->npar; i++)
-									{
-										if (i == rndattr)
-										{
-											MathEvaluation *ev = new MathEvaluation(numpars);
-											ev->mutate(false, false);
-											w->parevals.push_back(ev);
-										}
-										else
-										{
-											w->parevals.push_back(NULL);
-										}
-									}
-
-								}
-								strattractor = w->stringify(false);
-								par.setStringById(FL_PE_CONN_ATTR, strattractor);
-								delete w;
-							}
-						}
-					}
-					else
-					{
-						if (!(*selectedword)->parevals[randeval])
-						{
-							(*selectedword)->parevals[randeval] = new MathEvaluation(numpars);
-						}
-						(*selectedword)->parevals[randeval]->mutate(false, iterchangestep != 1.0);
-					}
-				}
-			}
-			break;
-		}
+					}
+				}
+				else
+				{
+					if (!(*selectedword)->parevals[randeval])
+					{
+						(*selectedword)->parevals[randeval] = new MathEvaluation(numpars);
+					}
+					(*selectedword)->parevals[randeval]->mutate(false, iterchangestep != 1.0);
+				}
+			}
+		}
+		break;
+	}
 	}
 
@@ -702,5 +702,5 @@
 	}
 	else if (to->words.find(fromword->name.c_str()) != to->words.end() &&
-			to->words[fromword->name.c_str()]->npar == fromword->npar) // if there is already same word with same number of parameters
+		to->words[fromword->name.c_str()]->npar == fromword->npar) // if there is already same word with same number of parameters
 	{
 		fL_Word *newword = new fL_Word();
@@ -710,5 +710,5 @@
 	}
 	for (std::unordered_map<std::string, fL_Word *>::iterator it = to->words.begin();
-			it != to->words.end(); it++)
+		it != to->words.end(); it++)
 	{ // find word with same number of parameters
 		if (fromword->npar == it->second->npar && map.find(fromword->name.c_str()) == map.end() && !it->second->builtin)
@@ -774,5 +774,5 @@
 					std::string form;
 					if (w->builtin && w->name == "N"
-							&& strcmp(par.id(i), FL_PE_NEURO_DET) == 0)
+						&& strcmp(par.id(i), FL_PE_NEURO_DET) == 0)
 					{
 						SString res = origpar.getStringById(FL_PE_NEURO_DET);
@@ -781,8 +781,8 @@
 					}
 					else if (w->builtin && w->name == "C"
-							&& strcmp(par.id(i), FL_PE_CONN_ATTR) == 0)
+						&& strcmp(par.id(i), FL_PE_CONN_ATTR) == 0)
 					{
 						SString strattractor = origpar.getStringById(FL_PE_CONN_ATTR);
-						if (strattractor.len() > 0)
+						if (strattractor.length() > 0)
 						{
 							fL_Word *tmp = NULL;
Index: cpp/frams/genetics/fS/fS_general.cpp
===================================================================
--- cpp/frams/genetics/fS/fS_general.cpp	(revision 972)
+++ cpp/frams/genetics/fS/fS_general.cpp	(revision 973)
@@ -99,10 +99,10 @@
 		if (separatorIndex == -1)
 		{
-			keyLength = keyValue.len();
+			keyLength = keyValue.length();
 			value = DEFAULT_NEURO_CONNECTION_WEIGHT;
 		} else
 		{
 			keyLength = separatorIndex;
-			size_t valueLength = keyValue.len() - (separatorIndex);
+			size_t valueLength = keyValue.length() - (separatorIndex);
 			value = fS_stod(buffer + separatorIndex + 1, start, &valueLength);
 		}
@@ -859,5 +859,5 @@
 {
 	SString geno;
-	geno.memoryHint(100);     // Provide a small buffer from the start to improve performance
+	geno.reserve(100);     // Provide a small buffer from the start to improve performance
 	startNode->getGeno(geno);
 	return geno;
Index: cpp/frams/model/autoname.cpp
===================================================================
--- cpp/frams/model/autoname.cpp	(revision 972)
+++ cpp/frams/model/autoname.cpp	(revision 973)
@@ -1,4 +1,4 @@
 // This file is a part of Framsticks SDK.  http://www.framsticks.com/
-// Copyright (C) 1999-2015  Maciej Komosinski and Szymon Ulatowski.
+// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
 // See LICENSE.txt for details.
 
@@ -11,10 +11,10 @@
 	SString t;
 	t = firstName(model);
-	SString last=lastName(model);
-	if (last.len()>0)
-		{
+	SString last = lastName(model);
+	if (last.length() > 0)
+	{
 		t += ' ';
 		t += last;
-		}
+	}
 	return t;
 }
@@ -42,6 +42,6 @@
 	unsigned int s1 = 0, s2 = 0, s3 = 0;
 	const char *x = g.c_str();
-	if (*x==0) return SString();
-	for (; *x; x++) { s1 += *x; s2 = s2**x + *x; s3 = (s3^*x) + *x; }
+	if (*x == 0) return SString();
+	for (; *x; x++) { s1 += *x; s2 = s2 * *x + *x; s3 = (s3 ^ *x) + *x; }
 	char* t = buf;
 	t = cat_syl(t, s1);
@@ -71,6 +71,6 @@
 		for (i = 0; i <= pp; i++)
 		{
-		p = (i*d1) / pp - 1; for (; p1 <= p; p1++) *(out++) = *(in1++);
-		p = (i*d2) / pp - 1; for (; p2 <= p; p2++) *(out++) = *(in2++);
+			p = (i * d1) / pp - 1; for (; p1 <= p; p1++) *(out++) = *(in1++);
+			p = (i * d2) / pp - 1; for (; p2 <= p; p2++) *(out++) = *(in2++);
 		}
 	*out = 0;
@@ -100,12 +100,12 @@
 	if (model.getPartCount() > 0)
 	{
-		cialo = min((int)(sqrt(double(model.getPartCount()) - 1)*NAME_BODYLEN), NAME_MAXLENBODY - 1);
+		cialo = min((int)(sqrt(double(model.getPartCount()) - 1) * NAME_BODYLEN), NAME_MAXLENBODY - 1);
 		poz = 0;
 		for (i = 0; i <= cialo; i++) // budowanie "opisu" ciala
 		{
-			nextpoz = ((model.getPartCount())*(i + 1)) / (cialo + 1) - 1;
+			nextpoz = ((model.getPartCount()) * (i + 1)) / (cialo + 1) - 1;
 			w = 1.0;
 			for (; poz <= nextpoz; poz++) w = max(w, model.getPart(poz)->mass);
-			tmpc[i] = Sp[min(int((w - 1.0)*NAME_BODYMASS), int(sizeof(Sp)) - 2)];
+			tmpc[i] = Sp[min(int((w - 1.0) * NAME_BODYMASS), int(sizeof(Sp)) - 2)];
 		}
 		tmpc[i] = 0;
@@ -117,12 +117,12 @@
 	if (model.getNeuroCount() > 0)
 	{
-		mozg = min((int)(sqrt((double)model.getNeuroCount())*NAME_BRAINLEN), NAME_MAXLENBRAIN - 1);
+		mozg = min((int)(sqrt((double)model.getNeuroCount()) * NAME_BRAINLEN), NAME_MAXLENBRAIN - 1);
 		poz = 0;
 		for (i = 0; i <= mozg; i++) // budowanie "opisu" mozgu
 		{
-			nextpoz = (model.getNeuroCount()*(i + 1)) / (mozg + 1) - 1;
+			nextpoz = (model.getNeuroCount() * (i + 1)) / (mozg + 1) - 1;
 			wint = 0;
 			for (; poz <= nextpoz; poz++) wint = max(wint, model.getNeuro(poz)->getInputCount());
-			tmpm[i] = Sam[min(int(wint*NAME_BRAININP), int(sizeof(Sam)) - 2)];
+			tmpm[i] = Sam[min(int(wint * NAME_BRAININP), int(sizeof(Sam)) - 2)];
 		}
 		tmpm[i] = 0;
Index: cpp/frams/model/modelparts.cpp
===================================================================
--- cpp/frams/model/modelparts.cpp	(revision 972)
+++ cpp/frams/model/modelparts.cpp	(revision 973)
@@ -149,5 +149,5 @@
 	SString t;
 	t = getDescription();
-	if (t.len()) t += "\n\n";
+	if (t.length()) t += "\n\n";
 	t += "Characteristics:\n";
 	if (getPreferredInputs())
@@ -171,5 +171,5 @@
 	if (p.getPropCount())
 	{
-		if (t.len()) t += "\n\n";
+		if (t.length()) t += "\n\n";
 		t += "Properties:\n";
 		const char *h;
@@ -341,5 +341,5 @@
 {
 	SString ret = getClassName();
-	if (myclassparams.len()) { if (!ret.len()) ret = "N"; ret += ":"; ret += myclassparams; }
+	if (myclassparams.length()) { if (!ret.length()) ret = "N"; ret += ":"; ret += myclassparams; }
 	return ret;
 }
@@ -372,5 +372,5 @@
 int Neuro::addInput(Neuro *child, double weight, const SString *info)
 {
-	inputs += NInput(child, weight, (info && (info->len())) ? new SString(*info) : 0);
+	inputs += NInput(child, weight, (info && (info->length())) ? new SString(*info) : 0);
 	child->parentcount++;
 	if (child->parentcount == 1) { child->parent = this; }
@@ -759,7 +759,7 @@
 		ParamEntry entries[] = {
 		 { "class", 2, 0, "neuro class", "s", GETSET(neuroclass) },
-		 { "liveNeuro", 2, 1, "live Neuro object", "oNeuro", GETONLY(liveNeuro) }};
+		 { "liveNeuro", 2, 1, "live Neuro object", "oNeuro", GETONLY(liveNeuro) } };
 #undef FIELDSTRUCT
-		for(auto& e : entries) add(&e);
+		for (auto& e : entries) add(&e);
 
 #define FIELDSTRUCT Neuro
@@ -804,5 +804,5 @@
 {
 #ifndef SDK_WITHOUT_FRAMS
-	NeuroNetImpl::getLiveNeuroObject(this,ret);
+	NeuroNetImpl::getLiveNeuroObject(this, ret);
 #endif
 }
Index: cpp/frams/neuro/impl/neuroimpl-fuzzy-f0.cpp
===================================================================
--- cpp/frams/neuro/impl/neuroimpl-fuzzy-f0.cpp	(revision 972)
+++ cpp/frams/neuro/impl/neuroimpl-fuzzy-f0.cpp	(revision 973)
@@ -1,4 +1,4 @@
 // This file is a part of Framsticks SDK.  http://www.framsticks.com/
-// Copyright (C) 1999-2015  Maciej Komosinski and Szymon Ulatowski.
+// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
 // See LICENSE.txt for details.
 
@@ -83,5 +83,5 @@
 int FuzzyF0String::convertStrToRules(const SString& str, const int ruledef[], int **rules, int setsNr, int rulesNr, int &maxOutputNr)
 {
-	int pos = 0, j, k, len = str.len();
+	int pos = 0, j, k, len = str.length();
 	int dNr = 0, sNr = 0;
 	int inNr, outNr; //number of inputs/outputs and corresponding fuzzy sets
Index: cpp/frams/neuro/impl/neuroimpl-fuzzy.cpp
===================================================================
--- cpp/frams/neuro/impl/neuroimpl-fuzzy.cpp	(revision 972)
+++ cpp/frams/neuro/impl/neuroimpl-fuzzy.cpp	(revision 973)
@@ -1,4 +1,4 @@
 // This file is a part of Framsticks SDK.  http://www.framsticks.com/
-// Copyright (C) 1999-2015  Maciej Komosinski and Szymon Ulatowski.
+// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
 // See LICENSE.txt for details.
 
@@ -21,5 +21,5 @@
 
 	//check correctness of given parameters: string must not be null, sets&rules number > 0
-	if ((fuzzySetsNr < 1) || (rulesNr < 1) || (fuzzySetString.len() == 0) || (fuzzyRulesString.len() == 0))
+	if ((fuzzySetsNr < 1) || (rulesNr < 1) || (fuzzySetString.length() == 0) || (fuzzyRulesString.length() == 0))
 		return 0; //error
 
Index: cpp/frams/neuro/neurofactory.cpp
===================================================================
--- cpp/frams/neuro/neurofactory.cpp	(revision 972)
+++ cpp/frams/neuro/neurofactory.cpp	(revision 973)
@@ -103,5 +103,5 @@
 		}
 	}
-	if (removed.len())
+	if (removed.length())
 		logPrintf("NeuroFactory", "removeUninmplemented", LOG_INFO,
 			"Removed Neuro classes: %s", removed.c_str());
Index: cpp/frams/neuro/neurolibparam.cpp
===================================================================
--- cpp/frams/neuro/neurolibparam.cpp	(revision 972)
+++ cpp/frams/neuro/neurolibparam.cpp	(revision 973)
@@ -1,4 +1,4 @@
 // This file is a part of Framsticks SDK.  http://www.framsticks.com/
-// Copyright (C) 1999-2015  Maciej Komosinski and Szymon Ulatowski.
+// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
 // See LICENSE.txt for details.
 
@@ -33,5 +33,5 @@
 static bool isGoodName(const SString& name)
 {
-	for (int i = 0; i < name.len(); i++)
+	for (int i = 0; i < name.length(); i++)
 		if (!isalnum(name[i])) return false;
 	return true;
Index: cpp/frams/param/multiparamload.cpp
===================================================================
--- cpp/frams/param/multiparamload.cpp	(revision 972)
+++ cpp/frams/param/multiparamload.cpp	(revision 973)
@@ -1,4 +1,4 @@
 // This file is a part of Framsticks SDK.  http://www.framsticks.com/
-// Copyright (C) 1999-2018  Maciej Komosinski and Szymon Ulatowski.
+// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
 // See LICENSE.txt for details.
 
@@ -158,11 +158,11 @@
 		}
 		buf = trim(buf);
-		if (buf.len() == 0)
-			unexpected_line = 0;
-		else if ((buf.len() > 1) && (buf[buf.len() - 1] == ':'))
+		if (buf.length() == 0)
+			unexpected_line = 0;
+		else if ((buf.length() > 1) && (buf[buf.length() - 1] == ':'))
 		{
 			unexpected_line = 0;
 			lastunknown = 0;
-			lastunknown = buf.substr(0, buf.len() - 1);
+			lastunknown = buf.substr(0, buf.length() - 1);
 			lastobject.setEmpty();
 			FOREACH(ExtObject*, o, objects)
@@ -193,5 +193,5 @@
 					thisfilename ? SString::sprintf(" while reading '%s'", thisfilename).c_str() : "");
 			}
-				break;
+			break;
 
 			case 1:
@@ -293,6 +293,6 @@
 		if (stat == OnError)
 		{
-		abort();
-		return 0;
+			abort();
+			return 0;
 		}
 	return 1;
Index: cpp/frams/param/mutableparam.cpp
===================================================================
--- cpp/frams/param/mutableparam.cpp	(revision 972)
+++ cpp/frams/param/mutableparam.cpp	(revision 973)
@@ -1,4 +1,4 @@
 // This file is a part of Framsticks SDK.  http://www.framsticks.com/
-// Copyright (C) 1999-2019  Maciej Komosinski and Szymon Ulatowski.
+// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
 // See LICENSE.txt for details.
 
@@ -33,5 +33,5 @@
 int MutableParam::findGroup(const SString name, int ignoreprefix)
 {
-	int skipprefix = grprefix.len() ? grprefix.len() + 2 : 0;
+	int skipprefix = grprefix.length() ? grprefix.length() + 2 : 0;
 	for (int i = 0; i < groups.size(); i++)
 	{
@@ -57,5 +57,5 @@
 	{
 		tmp = grprefix;
-		if (tmp.len()) tmp += ": ";
+		if (tmp.length()) tmp += ": ";
 		tmp += gname;
 	}
Index: cpp/frams/param/param.cpp
===================================================================
--- cpp/frams/param/param.cpp	(revision 972)
+++ cpp/frams/param/param.cpp	(revision 973)
@@ -1,4 +1,4 @@
 // This file is a part of Framsticks SDK.  http://www.framsticks.com/
-// Copyright (C) 1999-2019  Maciej Komosinski and Szymon Ulatowski.
+// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
 // See LICENSE.txt for details.
 
@@ -56,5 +56,5 @@
 	int j;
 	for (int i = 0; i < n; i++)
-		if ((!(flags(i)&PARAM_READONLY))
+		if ((!(flags(i) & PARAM_READONLY))
 			&& (*type(i) != 'p'))
 		{
@@ -71,5 +71,5 @@
 	ExtValue v;
 	for (int i = 0; i < n; i++)
-		if ((!(flags(i)&PARAM_READONLY))
+		if ((!(flags(i) & PARAM_READONLY))
 			&& (*type(i) != 'p'))
 		{
@@ -178,5 +178,5 @@
 		else
 		{
-			if (def.len() > 0) setExtValue(i, ExtValue(def)); else setExtValue(i, ExtValue::empty());
+			if (def.length() > 0) setExtValue(i, ExtValue(def)); else setExtValue(i, ExtValue::empty());
 		}
 	}
@@ -303,5 +303,5 @@
 int ParamInterface::saveprop(VirtFILE* f, int i, const char* p, bool force)
 {
-	if ((flags(i)&PARAM_DONTSAVE) && (!force)) return 0;
+	if ((flags(i) & PARAM_DONTSAVE) && (!force)) return 0;
 	const char *typ = type(i);
 	if (*typ == 'p') return 0;
@@ -323,5 +323,5 @@
 	quoteTilde(ws);
 	w = ws.c_str();
-	if (ws.len() > 50) cr = 1;
+	if (ws.length() > 50) cr = 1;
 	else for (t = w; *t; t++) if ((*t == 10) || (*t == 13)) { cr = 1; break; }
 	if (cr) f->Vputs("~\n");
@@ -334,6 +334,6 @@
 {
 	SString ret = getName();
-	ret+=".";
-	ret+=id(prop);
+	ret += ".";
+	ret += id(prop);
 	return ret;
 }
@@ -342,13 +342,13 @@
 {
 	SString name_dot_prop = nameDotProperty(prop);
-	if (strcmp(getName(),getLongName())==0)
-		{
-		if (strcmp(id(prop),name(prop))==0)
+	if (strcmp(getName(), getLongName()) == 0)
+	{
+		if (strcmp(id(prop), name(prop)) == 0)
 			return name_dot_prop;
 		else
-			return SString("'")+name(prop)+"': "+name_dot_prop;
-		}
-	else
-		return SString("'")+name(prop)+"' in '"+getLongName()+"': "+name_dot_prop;
+			return SString("'") + name(prop) + "': " + name_dot_prop;
+	}
+	else
+		return SString("'") + name(prop) + "' in '" + getLongName() + "': " + name_dot_prop;
 }
 
@@ -394,5 +394,5 @@
 	// t+=SString(getName()); t+=':';
 	for (i = 0; p = id(i); i++)
-		if (!((fl = flags(i))&PARAM_DONTSAVE))
+		if (!((fl = flags(i)) & PARAM_DONTSAVE))
 		{
 			if (defdata && isequal(i, defdata))
@@ -469,5 +469,5 @@
 			nameDotPropertyForMessages(i).c_str(),
 			::sstringDelimitAndShorten(svaluetoset, 30, show_length, quote, quote).c_str(),
-			(setflags&PSET_HITMAX) ? (s_type ? "long" : "big") : "small", s_type ? "Truncated" : "Adjusted",
+			(setflags & PSET_HITMAX) ? (s_type ? "long" : "big") : "small", s_type ? "Truncated" : "Adjusted",
 			::sstringDelimitAndShorten(actual, 30, show_length, quote, quote).c_str()
 		);
@@ -583,5 +583,5 @@
 			else
 				seen[i] = true;
-			if (!(flags(i)&PARAM_DONTLOAD))
+			if (!(flags(i) & PARAM_DONTLOAD))
 			{
 				if (p0[p_len + 1] == '~')
@@ -600,5 +600,5 @@
 					int ch; while ((ch = f->Vgetc()) != EOF) if (ch == '\n') break;
 					unquoteTilde(s);
-					if (options.linenum && (flags(i)&PARAM_LINECOMMENT))
+					if (options.linenum && (flags(i) & PARAM_LINECOMMENT))
 						s = SString::sprintf("@file %s\n@line %d\n", f->VgetPath(), *options.linenum + 1) + s;
 					setFromString(i, s.c_str(), false);
@@ -943,5 +943,5 @@
 	if (err != NULL)
 		logPrintf("SimpleAbstractParam", "sanityCheck", LOG_ERROR,
-			  "Invalid ParamEntry for %s (%s)", nameDotPropertyForMessages(i).c_str(), err);
+			"Invalid ParamEntry for %s (%s)", nameDotPropertyForMessages(i).c_str(), err);
 }
 #endif
@@ -1054,5 +1054,5 @@
 	ExtValue v;
 	ParamEntry *pe = entry(i);
-	if (pe->flags&PARAM_READONLY) return PSET_RONLY;
+	if (pe->flags & PARAM_READONLY) return PSET_RONLY;
 	paInt xcopy = x; //only needed for messageOnExceedRange(): retain original, requested value of x because it may be changed below
 	paInt mn = 0, mx = 0, de = 0;
@@ -1088,5 +1088,5 @@
 	ExtValue v;
 	ParamEntry *pe = entry(i);
-	if (pe->flags&PARAM_READONLY) return PSET_RONLY;
+	if (pe->flags & PARAM_READONLY) return PSET_RONLY;
 	double xcopy = x; //only needed for messageOnExceedRange(): retain original, requested value of x because it may be changed below
 	double mn = 0, mx = 0, de = 0;
@@ -1124,5 +1124,5 @@
 	const SString *xx = &x;
 	ParamEntry *pe = entry(i);
-	if (pe->flags&PARAM_READONLY) return PSET_RONLY;
+	if (pe->flags & PARAM_READONLY) return PSET_RONLY;
 	SString xcopy = x; //only needed for messageOnExceedRange(): retain original, requested value of x because it may be changed below
 	const char* t = pe->type + 1;
@@ -1132,5 +1132,5 @@
 	if (sscanf(t, "%d %d", &mn, &mx) == 2) //using getMinMax would also get default value, which is not needed here
 	{
-		if ((x.len() > mx) && (mx > 0))
+		if ((x.length() > mx) && (mx > 0))
 		{
 			vs = x.substr(0, mx);
@@ -1163,6 +1163,6 @@
 	ExtValue v;
 	ParamEntry *pe = entry(i);
-	if (pe->flags&PARAM_READONLY) return PSET_RONLY;
-	if (pe->flags&PARAM_OBJECTSET)
+	if (pe->flags & PARAM_READONLY) return PSET_RONLY;
+	if (pe->flags & PARAM_OBJECTSET)
 	{
 		ExtObject o = getObject(i);
@@ -1200,5 +1200,5 @@
 	SANITY_CHECK(i);
 	ParamEntry *pe = entry(i);
-	if (pe->flags&PARAM_READONLY) return PSET_RONLY;
+	if (pe->flags & PARAM_READONLY) return PSET_RONLY;
 	ExtValue xcopy = x; //only needed for messageOnExceedRange(): retain original, requested value of x because it may be changed below
 	if (pe->fun2)
@@ -1255,8 +1255,8 @@
 {
 	const char *beg = s.c_str() + poz;
-	if (poz >= s.len()) { poz = s.len(); len = 0; return s.c_str() + s.len(); }
+	if (poz >= s.length()) { poz = s.length(); len = 0; return s.c_str() + s.length(); }
 	const char *lf = strchr(beg, '\n');
-	if (!lf) { lf = s.c_str() + s.len() - 1; poz = s.len(); }
-	else { poz = (int)(lf - s.c_str()) + 1; if (poz > s.len()) poz = s.len(); }
+	if (!lf) { lf = s.c_str() + s.length() - 1; poz = s.length(); }
+	else { poz = (int)(lf - s.c_str()) + 1; if (poz > s.length()) poz = s.length(); }
 	while (lf >= beg) if ((*lf == '\n') || (*lf == '\r')) lf--; else break;
 	len = (int)(lf - beg) + 1;
@@ -1278,5 +1278,5 @@
 	SString tmpvalue;
 	bool parse_failed = false;
-	if (options.offset >= s.len()) return fields_loaded;
+	if (options.offset >= s.length()) return fields_loaded;
 	t = s.c_str() + options.offset;
 
@@ -1316,5 +1316,5 @@
 		if (field_end == t)	// skip empty value
 		{
-			t++; if (i>=0) i++;
+			t++; if (i >= 0) i++;
 			continue;
 		}
@@ -1332,9 +1332,9 @@
 #ifdef WARN_MISSING_NAME
 		else // no parameter name
-			{
+		{
 #ifdef SAVE_SELECTED_NAMES
 			if ((i < 0) // field after unknown field
-			    || (i >= getPropCount()) // field after last field
-			    || !(flags(i)&PARAM_CANOMITNAME)) // valid field but it can't be skipped
+				|| (i >= getPropCount()) // field after last field
+				|| !(flags(i) & PARAM_CANOMITNAME)) // valid field but it can't be skipped
 #endif
 			{
@@ -1344,5 +1344,5 @@
 					logPrintf("Param", "loadSingleLine", LOG_WARN, "Value after the last property of '%s'", getName());
 			}
-			}
+		}
 		//else skipping a skippable field
 #endif
@@ -1364,5 +1364,5 @@
 			ret = setFromString(i, value, true);
 			fields_loaded++;
-			if (ret&PSET_PARSEFAILED)
+			if (ret & PSET_PARSEFAILED)
 				parse_failed = true;
 			*(char*)valstop = remember;
Index: cpp/frams/util/extvalue.cpp
===================================================================
--- cpp/frams/util/extvalue.cpp	(revision 972)
+++ cpp/frams/util/extvalue.cpp	(revision 973)
@@ -326,5 +326,5 @@
 		{
 			SString tmp = getString();
-			if (tmp.len() > 30) tmp = tmp.substr(0, 30) + "...";
+			if (tmp.length() > 30) tmp = tmp.substr(0, 30) + "...";
 			if (type == TString) tmp = SString("\"") + tmp + SString("\"");
 			logPrintf("ExtValue", "getObjectTarget", LOG_WARN, "%s object expected, %s found", classname, tmp.c_str());
@@ -614,5 +614,5 @@
 			return;
 		case TDouble:
-			setDouble(double(getInt())*src.getDouble());
+			setDouble(double(getInt()) * src.getDouble());
 			return;
 		default:;
@@ -790,5 +790,5 @@
 	//            ^-cur     ^-next
 	//            ^^^^^^^^^^___sub
-	const char* begin = fmt.c_str(), *end = begin + fmt.len(), *curr = begin;
+	const char* begin = fmt.c_str(), *end = begin + fmt.length(), *curr = begin;
 	int type = 0;
 
@@ -1401,5 +1401,5 @@
 	err->message = args[0].getString();
 	if (err->message.startsWith(TO_STRING_PREFIX.c_str()))
-		err->message = err->message.substr(TO_STRING_PREFIX.len());
+		err->message = err->message.substr(TO_STRING_PREFIX.length());
 	*ret = makeDynamicObject(err);
 }
Index: cpp/frams/util/sstring-simple.cpp
===================================================================
--- cpp/frams/util/sstring-simple.cpp	(revision 972)
+++ cpp/frams/util/sstring-simple.cpp	(revision 973)
@@ -8,5 +8,5 @@
 void SString::initEmpty()
 {
-	txt = NULL; used = 0; size = 0;
+	txt = NULL; used = 0; allocated = 0;
 }
 
@@ -18,5 +18,5 @@
 SString::~SString()
 {
-	resize(0);
+	reallocate(0);
 }
 
@@ -36,6 +36,6 @@
 SString::SString(SString&& from)
 {
-	txt = from.txt; size = from.size; used = from.used;
-	from.txt = NULL; from.size = 0; from.used = 0;
+	txt = from.txt; allocated = from.allocated; used = from.used;
+	from.txt = NULL; from.allocated = 0; from.used = 0;
 }
 
@@ -46,20 +46,20 @@
 }
 
-void SString::resize(int newsize)
-{
-	if (newsize == size) return;
+void SString::reallocate(int newsize)
+{
+	if (newsize == allocated) return;
 	txt = (char*)realloc(txt, newsize);
-	size = newsize;
-}
-
-void SString::ensureSize(int needed)
-{
-	if (size > needed) return;
-	resize((size > 0) ? (needed + needed / 2 + 1) : (needed + 1));
+	allocated = newsize;
+}
+
+void SString::ensureAllocated(int needed)
+{
+	if (allocated > needed) return;
+	reallocate((allocated > 0) ? (needed + needed / 2 + 1) : (needed + 1));
 }
 
 char *SString::directWrite(int ensuresize)
 {
-	ensureSize(ensuresize);
+	ensureAllocated(ensuresize);
 	appending = used;
 	return txt;
@@ -68,5 +68,5 @@
 char *SString::directAppend(int maxappend)
 {
-	ensureSize(used + maxappend);
+	ensureAllocated(used + maxappend);
 	appending = used;
 	return txt + appending;
@@ -78,5 +78,5 @@
 	else txt[newlength] = 0;
 	used = newlength;
-	assert(used < size);
+	assert(used < allocated);
 }
 
@@ -86,5 +86,5 @@
 	else txt[appending + newappend] = 0;
 	used = appending + newappend;
-	assert(used < size);
+	assert(used < allocated);
 }
 
@@ -102,5 +102,5 @@
 {
 	if (!n) return;
-	ensureSize(used + n);
+	ensureAllocated(used + n);
 	memmove(txt + used, t, n);
 	used += n;
@@ -110,5 +110,5 @@
 void SString::operator+=(const SString&s)
 {
-	append(s.c_str(), s.len());
+	append(s.c_str(), s.length());
 }
 
@@ -116,5 +116,5 @@
 {
 	SString ret;
-	ret.reserve(len() + s.len());
+	ret.reserve(length() + s.length());
 	ret = *this;
 	ret += s;
@@ -130,5 +130,5 @@
 	if (chlen)
 	{
-		ensureSize(chlen);
+		ensureAllocated(chlen);
 		memmove(txt, ch, chlen);
 		txt[chlen] = 0;
@@ -153,16 +153,16 @@
 {
 	if (&s == this) return;
-	copyFrom(s.c_str(), s.len());
+	copyFrom(s.c_str(), s.length());
 }
 
 ///////////////////////////////////////
 
-SString SString::substr(int begin, int length) const
-{
-	if (begin < 0) { length += begin; begin = 0; }
-	if (length >= (len() - begin)) length = len() - begin;
-	if (length <= 0) return SString();
-	if (length == len()) return *this;
-	return SString((*this)(begin), length);
+SString SString::substr(int begin, int numchars) const
+{
+	if (begin < 0) { numchars += begin; begin = 0; }
+	if (numchars >= (length() - begin)) numchars = length() - begin;
+	if (numchars <= 0) return SString();
+	if (numchars == length()) return *this;
+	return SString((*this)(begin), numchars);
 }
 
@@ -172,5 +172,5 @@
 {
 	if (this == &s) return true;
-	if (len() != s.len()) return false;
+	if (length() != s.length()) return false;
 	return strcmp(getPtr(), s.getPtr()) == 0;
 }
@@ -198,9 +198,9 @@
 bool SString::getNextToken(int& pos, SString &token, char separator) const
 {
-	if (pos >= len()) { token = 0; return false; }
+	if (pos >= length()) { token = 0; return false; }
 	int p1 = pos, p2;
 	const char *t1 = getPtr() + pos;
 	const char *t2 = strchr(t1, separator);
-	if (t2) pos = (p2 = (t2 - getPtr())) + 1; else p2 = pos = len();
+	if (t2) pos = (p2 = (t2 - getPtr())) + 1; else p2 = pos = length();
 	strncpy(token.directWrite(p2 - p1), t1, p2 - p1);
 	token.endWrite(p2 - p1);
@@ -254,5 +254,5 @@
 		char* p = ret.directWrite(size);
 		assert(p != NULL);
-		size = ret.directMaxLen() + 1;
+		size = ret.capacity() + 1;
 		/* Try to print in the allocated space. */
 		va_start(ap, format);
Index: cpp/frams/util/sstring-simple.h
===================================================================
--- cpp/frams/util/sstring-simple.h	(revision 972)
+++ cpp/frams/util/sstring-simple.h	(revision 973)
@@ -14,5 +14,5 @@
 private:
 	char *txt;      ///< string buffer or NULL for empty string
-	int size;       ///< allocated memory (including \0)
+	int allocated;       ///< allocated memory (including \0)
 	int used;	///< string length
 	int appending;  ///< append mode, changes can occur after character # 'appending'
@@ -20,6 +20,6 @@
 	void initEmpty();
 	void copyFrom(SString &from); ///< copy from SString
-	void resize(int newsize);
-	void ensureSize(int needed);
+	void reallocate(int newsize);
+	void ensureAllocated(int needed);
 	const char* getPtr() const { return txt ? txt : ""; }
 
@@ -34,15 +34,16 @@
 
 	void copyFrom(const char* ch, int chlen = -1); ///< copy string, length of -1 == unknown
-	
-	void* operator new(size_t s, void* mem){ return mem; }
+
+	void* operator new(size_t s, void* mem) { return mem; }
 #ifdef _MSC_VER
-		void operator delete(void* mem, void* t) {}
+	void operator delete(void* mem, void* t) {}
 #endif
-	void* operator new(size_t s){ return malloc(sizeof(SString)); }
+	void* operator new(size_t s) { return malloc(sizeof(SString)); }
 	void operator delete(void* mem) { free(mem); }
 
-	int len() const { return used; } ///< get string length
+	int length() const { return used; } ///< get string length
+	int size() const { return length(); } ///< get string length
 	void shrink(); ///< free unnecessary buffer
-	void reserve(int needed) { ensureSize(needed); } ///< like in std::string
+	void reserve(int cap) { ensureAllocated(cap + 1); } ///< like in std::string
 
 	/// after this call, you can modify sstring directly.
@@ -87,6 +88,5 @@
 	void endAppend(int appendlength = -1);
 
-	void memoryHint(int howbig) { ensureSize(howbig); }
-	int directMaxLen() { return size - 1; } ///< when called after directWrite: max number of characters allowed (can be more than requested)
+	int capacity() { return (allocated > 0) ? (allocated - 1) : allocated; } ///< std::string.capacity()
 
 	/// find a character in SString.
Index: cpp/frams/util/sstring.cpp
===================================================================
--- cpp/frams/util/sstring.cpp	(revision 972)
+++ cpp/frams/util/sstring.cpp	(revision 973)
@@ -163,9 +163,4 @@
 }
 
-void SString::memoryHint(int howbig)
-{
-	detachCopy(howbig);
-}
-
 void SString::detachEmpty(int ensuresize)
 {
@@ -201,5 +196,5 @@
 char *SString::directWrite(int ensuresize)
 {
-	if (ensuresize < 0) ensuresize = len();
+	if (ensuresize < 0) ensuresize = length();
 	REF_LOCK;
 	detachCopy(ensuresize);
@@ -259,5 +254,5 @@
 void SString::operator+=(const SString&s)
 {
-	append(s.c_str(), s.len());
+	append(s.c_str(), s.length());
 }
 
@@ -298,11 +293,11 @@
 ///////////////////////////////////////
 
-SString SString::substr(int begin, int length) const
-{
-	if (begin < 0) { length += begin; begin = 0; }
-	if (length >= (len() - begin)) length = len() - begin;
-	if (length <= 0) return SString();
-	if (length == len()) return *this;
-	return SString((*this)(begin), length);
+SString SString::substr(int begin, int numchars) const
+{
+	if (begin < 0) { numchars += begin; begin = 0; }
+	if (numchars >= (length() - begin)) numchars = length() - begin;
+	if (numchars <= 0) return SString();
+	if (numchars == length()) return *this;
+	return SString((*this)(begin), numchars);
 }
 
@@ -337,9 +332,9 @@
 bool SString::getNextToken(int& pos, SString &token, char separator) const
 {
-	if (pos >= len()) { token = 0; return false; }
+	if (pos >= length()) { token = 0; return false; }
 	int p1 = pos, p2;
 	const char *t1 = buf->txt + pos;
 	const char *t2 = strchr(t1, separator);
-	if (t2) pos = (p2 = (t2 - buf->txt)) + 1; else p2 = pos = len();
+	if (t2) pos = (p2 = (t2 - buf->txt)) + 1; else p2 = pos = length();
 	strncpy(token.directWrite(p2 - p1), t1, p2 - p1);
 	token.endWrite(p2 - p1);
@@ -401,5 +396,5 @@
 		char* p = ret.directWrite(size);
 		assert(p != NULL);
-		size = ret.directMaxLen() + 1;
+		size = ret.capacity() + 1;
 		/* Try to print in the allocated space. */
 		va_start(ap, format);
Index: cpp/frams/util/sstring.h
===================================================================
--- cpp/frams/util/sstring.h	(revision 972)
+++ cpp/frams/util/sstring.h	(revision 973)
@@ -1,4 +1,4 @@
 // This file is a part of Framsticks SDK.  http://www.framsticks.com/
-// Copyright (C) 1999-2015  Maciej Komosinski and Szymon Ulatowski.
+// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
 // See LICENSE.txt for details.
 
@@ -85,7 +85,8 @@
 	void operator delete(void* mem) { free(mem); }
 
-	int len() const { return buf->used; } ///< get string length
+	int size() const { return buf->used; } ///< get string length
+	int length() const { return buf->used; } ///< get string length
 	void shrink(); ///< free unnecessary buffer
-	void reserve(int needed) { ensureSize(needed); } ///< like in std::string
+	void reserve(int needed) { detachCopy(needed); } ///< like in std::string
 
 	/// after this call, you can modify sstring directly.
@@ -129,9 +130,5 @@
 	/// t.endAppend(bytecount);</CODE>
 	void endAppend(int appendlength = -1);
-	/// argument is the amount of memory, that will be probably used
-	/// by this string instance. string can use this value
-	/// to optimize memory allocation (bigger chunks will be allocated).
-	void memoryHint(int howbig);
-	int directMaxLen() { return buf->size; } ///< when called after directWrite: max number of characters allowed (can be more than requested)
+	int capacity() { return buf->size; } ///< std::string.capacity()
 
 	/// find a character in SString.
Index: cpp/frams/util/sstringutils.cpp
===================================================================
--- cpp/frams/util/sstringutils.cpp	(revision 972)
+++ cpp/frams/util/sstringutils.cpp	(revision 973)
@@ -1,4 +1,4 @@
 // This file is a part of Framsticks SDK.  http://www.framsticks.com/
-// Copyright (C) 1999-2015  Maciej Komosinski and Szymon Ulatowski.
+// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
 // See LICENSE.txt for details.
 
@@ -79,5 +79,5 @@
 		else
 		{
-			if (tmp.len() == 0) return 0; // nothing was changed!
+			if (tmp.length() == 0) return 0; // nothing was changed!
 			tmp += x;
 			target = tmp;
@@ -112,5 +112,5 @@
 		else
 		{
-			if (tmp.len() == 0) return 0; // nothing was changed!
+			if (tmp.length() == 0) return 0; // nothing was changed!
 			tmp += x;
 			target = tmp;
@@ -139,5 +139,5 @@
 	bool changed = 0;
 	SString tmp;
-	tmp.memoryHint(target.len());
+	tmp.reserve(target.length());
 	while (*x)
 	{
@@ -160,6 +160,6 @@
 {
 	SString out;
-	if (in.len() > maxlen)
-		out = in.substr(0, maxlen / 2) + "..." + in.substr(in.len() - maxlen + maxlen / 2);
+	if (in.length() > maxlen)
+		out = in.substr(0, maxlen / 2) + "..." + in.substr(in.length() - maxlen + maxlen / 2);
 	else
 	{
@@ -169,5 +169,5 @@
 	out = before + out + after;
 	if (show_length)
-		out += SString::sprintf(" (length %d)", in.len());
+		out += SString::sprintf(" (length %d)", in.length());
 	return out;
 }
@@ -208,5 +208,5 @@
 		else
 		{
-			if (tmp.len() == 0) return 0; // nothing was changed!
+			if (tmp.length() == 0) return 0; // nothing was changed!
 			tmp += x;
 			target = tmp;
@@ -223,7 +223,7 @@
 	{
 		n = strchr(t + pos, ',');
-		if ((!strncmp(t + pos, name.c_str(), name.len())) && (t[pos + name.len()] == '='))
-		{
-			if (n) end = n - t; else end = txt.len();
+		if ((!strncmp(t + pos, name.c_str(), name.length())) && (t[pos + name.length()] == '='))
+		{
+			if (n) end = n - t; else end = txt.length();
 			return pos;
 		}
@@ -238,5 +238,5 @@
 	p = strFindField(txt, name, e);
 	if (p < 0) return SString();
-	p += name.len() + 1;
+	p += name.length() + 1;
 	return SString(txt.substr(p, e - p));
 }
@@ -248,29 +248,29 @@
 	if (p < 0)
 	{
-		if (!value.len()) return;
-		char *t = txt.directAppend(1 + name.len() + value.len());
+		if (!value.length()) return;
+		char *t = txt.directAppend(1 + name.length() + value.length());
 		char *b = t;
-		if (txt.len()) *(t++) = ',';
-		strcpy(t, name.c_str()); t += name.len();
+		if (txt.length()) *(t++) = ',';
+		strcpy(t, name.c_str()); t += name.length();
 		*(t++) = '=';
-		strcpy(t, value.c_str()); t += value.len();
+		strcpy(t, value.c_str()); t += value.length();
 		txt.endAppend(t - b);
 	}
 	else
 	{
-		if (!value.len())
-		{
-			if (p > 0) p--; else if (e < txt.len()) e++;
+		if (!value.length())
+		{
+			if (p > 0) p--; else if (e < txt.length()) e++;
 			char *t = txt.directWrite(0);
-			memmove(t + p, t + e, txt.len() - e);
-			txt.endWrite(txt.len() + value.len() - (e - p));
-		}
-		else
-		{
-			p += name.len() + 1;
-			char *t = txt.directWrite(txt.len() + value.len() - (e - p));
-			memmove(t + p + value.len(), t + e, txt.len() - e);
-			memmove(t + p, value.c_str(), value.len());
-			txt.endWrite(txt.len() + value.len() - (e - p));
+			memmove(t + p, t + e, txt.length() - e);
+			txt.endWrite(txt.length() + value.length() - (e - p));
+		}
+		else
+		{
+			p += name.length() + 1;
+			char *t = txt.directWrite(txt.length() + value.length() - (e - p));
+			memmove(t + p + value.length(), t + e, txt.length() - e);
+			memmove(t + p, value.c_str(), value.length());
+			txt.endWrite(txt.length() + value.length() - (e - p));
 		}
 	}
@@ -280,8 +280,8 @@
 {
 	const unsigned char*b = (const unsigned char*)s.c_str();
-	const unsigned char*e = b + s.len();
+	const unsigned char*e = b + s.length();
 	while ((b < e) && (*b <= ' ')) b++;
 	while ((b < e) && (e[-1] <= ' ')) e--;
-	if ((e - b) == s.len()) return s;
+	if ((e - b) == s.length()) return s;
 	SString newstring;
 	char* t = newstring.directWrite(e - b);
@@ -291,10 +291,10 @@
 }
 
-SString concatPath(const SString& in1,const SString& in2)
-{
-	SString out=in1;
-	if (out.len()>0 && out[out.len()-1]!=PATH_SEPARATOR_CHAR)
-		out+=PATH_SEPARATOR_CHAR;
-	out+=in2;
+SString concatPath(const SString& in1, const SString& in2)
+{
+	SString out = in1;
+	if (out.length() > 0 && out[out.length() - 1] != PATH_SEPARATOR_CHAR)
+		out += PATH_SEPARATOR_CHAR;
+	out += in2;
 	return out;
 }
@@ -318,6 +318,6 @@
 bool matchWildcard(const SString& word, const SString& pattern)
 {
-	if (pattern.len() == 0)
-		return word.len() == 0;
+	if (pattern.length() == 0)
+		return word.length() == 0;
 	int aster = pattern.indexOf('*');
 	if (aster >= 0)
@@ -325,9 +325,9 @@
 		SString before = pattern.substr(0, aster);
 		SString after = pattern.substr(aster + 1);
-		if (!word.len()) return false;
-		if (before.len()) if (!word.startsWith(before.c_str())) return false;
-		if (after.len())
-			if ((word.len() < after.len())
-				|| (strcmp(after.c_str(), word.c_str() + word.len() - after.len())))
+		if (!word.length()) return false;
+		if (before.length()) if (!word.startsWith(before.c_str())) return false;
+		if (after.length())
+			if ((word.length() < after.length())
+				|| (strcmp(after.c_str(), word.c_str() + word.length() - after.length())))
 				return false;
 		return true;
@@ -339,6 +339,6 @@
 bool matchWildcardList(const SString& word, const SString& patterns)
 {
-	if (patterns.len() == 0)
-		return word.len() == 0;
+	if (patterns.length() == 0)
+		return word.length() == 0;
 	int pos = 0;
 	SString pattern;
Index: cpp/frams/util/sstringutils.h
===================================================================
--- cpp/frams/util/sstringutils.h	(revision 972)
+++ cpp/frams/util/sstringutils.h	(revision 973)
@@ -40,5 +40,5 @@
 	int i, next = 0;
 	bool first = true;
-	if (!separator.len()) { result.push_back(text); return; }
+	if (!separator.length()) { result.push_back(text); return; }
 	while (1)
 	{
@@ -46,5 +46,5 @@
 		if (i < 0)
 		{
-			if ((next <= text.len()) || first)
+			if ((next <= text.length()) || first)
 				result.push_back(text.substr(next));
 			return;
@@ -55,5 +55,5 @@
 			first = false;
 		}
-		next = i + separator.len();
+		next = i + separator.length();
 	}
 }
Index: cpp/frams/vm/framscript.l
===================================================================
--- cpp/frams/vm/framscript.l	(revision 972)
+++ cpp/frams/vm/framscript.l	(revision 973)
@@ -116,5 +116,5 @@
 static SString quoteMultiline(const SString &src)
 {
-int len=src.len();
+int len=src.length();
 SString ret;
 ret.reserve((len*11)/10+10);
Index: cpp/frams/vm/framscript.y
===================================================================
--- cpp/frams/vm/framscript.y	(revision 972)
+++ cpp/frams/vm/framscript.y	(revision 973)
@@ -1513,5 +1513,5 @@
 	return val.getString();
 SString s=val.getString();
-int len=s.len();
+int len=s.length();
 SString ret;
 ret.reserve((len*11)/10+10);
