Index: /cpp/frams/genetics/f4/conv_f4.cpp
===================================================================
--- /cpp/frams/genetics/f4/conv_f4.cpp	(revision 773)
+++ /cpp/frams/genetics/f4/conv_f4.cpp	(revision 774)
@@ -25,8 +25,8 @@
 
 
-SString GenoConv_f40::convert(SString &in, MultiMap * map, bool using_checkpoints)
+SString GenoConv_f40::convert(SString &in, MultiMap *map, bool using_checkpoints)
 {
 	int res;
-	f4_Model * model = new f4_Model();
+	f4_Model *model = new f4_Model();
 	res = model->buildFromF4(in, using_checkpoints);
 	if (GENOPER_OK != res) return SString();  // oops
@@ -50,8 +50,8 @@
 
 
-SString GenoConv_F41_TestOnly::convert(SString &in, MultiMap * map, bool using_checkpoints)
+SString GenoConv_F41_TestOnly::convert(SString &in, MultiMap *map, bool using_checkpoints)
 {
 	int res;
-	f4_Model * model = new f4_Model();
+	f4_Model *model = new f4_Model();
 	res = model->buildFromF4(in, using_checkpoints);
 	if (GENOPER_OK != res) return SString();  // oops
@@ -126,5 +126,5 @@
 
 
-f4_Cell * f4_Model::getStick(f4_Cell * C)
+f4_Cell* f4_Model::getStick(f4_Cell *C)
 {
 	if (T_STICK4 == C->type) return C;
@@ -142,5 +142,5 @@
 
 /// updated by Macko to follow new SDK standards (no more neuroitems)
-int f4_Model::buildModelRec(f4_Cell * C)
+int f4_Model::buildModelRec(f4_Cell *C)
 {
 	int partidx;
@@ -192,5 +192,5 @@
 			// adjust mass/vol of first endpoint
 			jj_p1_refno = C->dadlink->p2_refno;
-			Part * p1 = getPart(jj_p1_refno);
+			Part *p1 = getPart(jj_p1_refno);
 			p1->mass += 1.0;
 			//      p1->volume += 1.0/C->P.mass;
@@ -230,5 +230,5 @@
 	if (C->type == T_NEURON4) ///<this case was updated by MacKo
 	{
-		const char * nclass = C->neuclass->name.c_str();
+		const char* nclass = C->neuclass->name.c_str();
 		int partno, jointno;
 		if (C->neuclass->getPreferredLocation() == 0)
@@ -298,7 +298,7 @@
 			if (C->links[j]->from == NULL)
 			{
-				const char * nclass = C->links[j]->t.c_str();
-				char * temp = (char*)C->links[j]->t.c_str();
-				NeuroClass * sensortest = GenoOperators::parseNeuroClass(temp);
+				const char* nclass = C->links[j]->t.c_str();
+				char* temp = (char*)C->links[j]->t.c_str();
+				NeuroClass *sensortest = GenoOperators::parseNeuroClass(temp);
 				//backward compatibility for G*TS
 				if (C->links[j]->t == "*" || C->links[j]->t == "S" || C->links[j]->t == "T")
Index: /cpp/frams/genetics/f4/conv_f4.h
===================================================================
--- /cpp/frams/genetics/f4/conv_f4.h	(revision 773)
+++ /cpp/frams/genetics/f4/conv_f4.h	(revision 774)
@@ -32,5 +32,5 @@
 	 * @return generated f0 genotype
 	 */
-	SString convert(SString &in, MultiMap * map, bool using_checkpoints);
+	SString convert(SString &in, MultiMap *map, bool using_checkpoints);
 };
 
@@ -57,5 +57,5 @@
 	 * @return generated approximate f1 genotype
 	 */
-	SString convert(SString &in, MultiMap * map, bool using_checkpoints);
+	SString convert(SString &in, MultiMap *map, bool using_checkpoints);
 };
 
@@ -82,10 +82,10 @@
 	void     toF1Geno(SString &out);       // output to f1 format, approximation
 private:
-	f4_Cells * cells;
-	int        buildModelRec(f4_Cell * ndad);
+	f4_Cells *cells;
+	int        buildModelRec(f4_Cell *ndad);
 	/**
 	 * Get a cell which is a stick, by traversing dadlinks.
 	 */
-	f4_Cell *  getStick(f4_Cell * C);
+	f4_Cell* getStick(f4_Cell *C);
 	int        error;
 	int        errorpos;
Index: /cpp/frams/genetics/f4/f4_general.cpp
===================================================================
--- /cpp/frams/genetics/f4/f4_general.cpp	(revision 773)
+++ /cpp/frams/genetics/f4/f4_general.cpp	(revision 774)
@@ -17,15 +17,15 @@
 #endif
 
-void rolling_dec(double * v)
+void rolling_dec(double *v)
 {
 	*v -= 0.7853;  // 0.7853981  45 degrees
 }
 
-void rolling_inc(double * v)
+void rolling_inc(double *v)
 {
 	*v += 0.7853;  // 0.7853981  45 degrees
 }
 
-int scanrec(const char * s, unsigned int slen, char stopchar)
+int scanrec(const char* s, unsigned int slen, char stopchar)
 {
 	unsigned int i = 0;
@@ -63,5 +63,5 @@
 
 f4_Cell::f4_Cell(int nname,
-	f4_Cell * ndad, int nangle, GeneProps newP)
+	f4_Cell *ndad, int nangle, GeneProps newP)
 {
 	name = nname;
@@ -84,5 +84,4 @@
 	//OM = Orient_1;
 	ctrl = 0;
-	state = 0;
 	inertia = 0.8;
 	force = 0.04;
@@ -102,5 +101,4 @@
 		if (T_NEURON4 == ndad->type)
 		{
-			state = ndad->state;
 			inertia = ndad->inertia;
 			force = ndad->force;
@@ -114,5 +112,5 @@
 
 
-f4_Cell::f4_Cell(f4_Cells * nO, int nname, f4_node * ngeno, f4_node * ngcur, f4_Cell * ndad, int nangle, GeneProps newP)
+f4_Cell::f4_Cell(f4_Cells *nO, int nname, f4_node *ngeno, f4_node *ngcur, f4_Cell *ndad, int nangle, GeneProps newP)
 {
 	name = nname;
@@ -138,5 +136,4 @@
 	//OM = Orient_1;
 	ctrl = 0;
-	state = 0;
 	inertia = 0.8;
 	force = 0.04;
@@ -156,5 +153,4 @@
 		if (T_NEURON4 == ndad->type)
 		{
-			state = ndad->state;
 			inertia = ndad->inertia;
 			force = ndad->force;
@@ -228,5 +224,5 @@
 					GeneProps newP = P;
 					newP.propagateAlong(false);
-					f4_Cell * tmp = new f4_Cell(org, org->nc, genot, gcur->child2, this, commacount, newP);
+					f4_Cell *tmp = new f4_Cell(org, org->nc, genot, gcur->child2, this, commacount, newP);
 					tmp->repeat = repeat;
 					repeat.clear();
@@ -246,5 +242,5 @@
 					tmp->neuclass = neuclass;
 					// duplicate links
-					f4_CellLink * ll;
+					f4_CellLink *ll;
 					for (int i = 0; i < nolink; i++)
 					{
@@ -640,5 +636,5 @@
 
 
-int f4_Cell::addlink(f4_Cell * nfrom, double nw, string nt)
+int f4_Cell::addlink(f4_Cell *nfrom, double nw, string nt)
 {
 	// if incoming neuron does not produce output, return error
@@ -725,5 +721,5 @@
 
 
-f4_CellLink::f4_CellLink(f4_Cell * nfrom, double nw, string nt)
+f4_CellLink::f4_CellLink(f4_Cell *nfrom, double nw, string nt)
 {
 	from = nfrom;
@@ -734,5 +730,5 @@
 
 
-f4_Cells::f4_Cells(f4_node * genome, int nrepair)
+f4_Cells::f4_Cells(f4_node *genome, int nrepair)
 {
 	// create ancestor cell
@@ -862,5 +858,5 @@
 
 
-void f4_Cells::addCell(f4_Cell * newcell)
+void f4_Cells::addCell(f4_Cell *newcell)
 {
 	if (nc >= MAX4CELLS - 1)
@@ -880,5 +876,5 @@
 }
 
-void f4_Cells::setRepairRemove(int nerrpos, f4_node * rem)
+void f4_Cells::setRepairRemove(int nerrpos, f4_node *rem)
 {
 	if (!repair)
@@ -896,5 +892,5 @@
 }
 
-int f4_Cells::setRepairInsert(int nerrpos, f4_node * parent, f4_node * insert)
+int f4_Cells::setRepairInsert(int nerrpos, f4_node *parent, f4_node *insert)
 {
 	if (!repair)
@@ -915,5 +911,5 @@
 }
 
-void f4_Cells::repairGeno(f4_node * geno, int whichchild)
+void f4_Cells::repairGeno(f4_node *geno, int whichchild)
 {
 	// assemble repaired geno, if the case
@@ -921,5 +917,5 @@
 	if ((NULL == repair_remove) && (NULL == repair_insert)) return;
 	// traverse genotype tree, remove / insert node
-	f4_node * g2;
+	f4_node *g2;
 	if (1 == whichchild) g2 = geno->child;
 	else             g2 = geno->child2;
@@ -928,5 +924,5 @@
 	if (g2 == repair_remove)
 	{
-		f4_node * oldgeno;
+		f4_node *oldgeno;
 		geno->removeChild(g2);
 		if (g2->child)
@@ -973,6 +969,6 @@
 {
 	int i, j, ccount;
-	f4_Cell * thisti;
-	f4_Cell * thneu;
+	f4_Cell *thisti;
+	f4_Cell *thneu;
 	char buf[200];
 
@@ -1117,5 +1113,5 @@
 }
 
-f4_node::f4_node(char nname, f4_node * nparent, int npos)
+f4_node::f4_node(char nname, f4_node *nparent, int npos)
 {
 	name = nname;
@@ -1138,5 +1134,5 @@
 }
 
-int f4_node::addChild(f4_node * nchi)
+int f4_node::addChild(f4_node *nchi)
 {
 	if (NULL == child)
@@ -1153,5 +1149,5 @@
 }
 
-int f4_node::removeChild(f4_node * nchi)
+int f4_node::removeChild(f4_node *nchi)
 {
 	if (nchi == child2)
@@ -1190,5 +1186,5 @@
 }
 
-f4_node * f4_node::ordNode(int n)
+f4_node* f4_node::ordNode(int n)
 {
 	int n1;
@@ -1210,5 +1206,5 @@
 }
 
-f4_node * f4_node::randomNode()
+f4_node* f4_node::randomNode()
 {
 	int n = count();
@@ -1217,10 +1213,10 @@
 }
 
-f4_node * f4_node::randomNodeWithSize(int mn, int mx)
+f4_node* f4_node::randomNodeWithSize(int mn, int mx)
 {
 	// try random nodes, and accept if size in range
 	// limit to maxlim tries
 	int i, n, maxlim;
-	f4_node * nod = NULL;
+	f4_node *nod = NULL;
 	maxlim = count();
 	for (i = 0; i < maxlim; i++)
@@ -1285,5 +1281,5 @@
 		{
 			char *temp = (char*)name.c_str();
-			NeuroClass * nc = GenoOperators::parseNeuroClass(temp);
+			NeuroClass *nc = GenoOperators::parseNeuroClass(temp);
 			if (nc != NULL)
 			{
@@ -1326,7 +1322,7 @@
 }
 
-f4_node * f4_node::duplicate()
-{
-	f4_node * copy;
+f4_node* f4_node::duplicate()
+{
+	f4_node *copy;
 	copy = new f4_node(*this);
 	copy->parent = NULL;  // set later
@@ -1356,5 +1352,5 @@
 // scan genotype string and build tree
 // return >1 for error (errorpos)
-int f4_processrec(const char * genot, unsigned pos0, f4_node * parent)
+int f4_processrec(const char* genot, unsigned pos0, f4_node *parent)
 {
 	int i, j, res, t;
@@ -1363,5 +1359,5 @@
 	double w;
 	unsigned gpos, oldpos;
-	f4_node * node1, *par;
+	f4_node *node1, *par;
 	unsigned beginindex;
 	string neutype = "";
@@ -1409,5 +1405,5 @@
 			// repetition marker, 1 by default
 			ExtValue val;
-			const char * end = val.parseNumber(genot + gpos + 1, ExtPType::TInt);
+			const char* end = val.parseNumber(genot + gpos + 1, ExtPType::TInt);
 			if (end == NULL) i = 1;
 			else i = val.getInt();
@@ -1499,5 +1495,5 @@
 			gpos += 2; //skipping "N:"
 			beginindex = gpos;
-			char * end = (char*)genot + beginindex;
+			char* end = (char*)genot + beginindex;
 			GenoOperators::parseNeuroClass(end);
 			gpos += end - genot - beginindex;
@@ -1602,5 +1598,5 @@
 	if (*parser != '[') return NULL;
 	parser++;
-	char * p = (char*)parser;
+	char* p = (char*)parser;
 	if (GenoOperators::parseNeuroClass(p) == NULL) return NULL;
 	neutype = string(parser, (const char *)p);
@@ -1617,7 +1613,7 @@
 }
 
-f4_node * f4_processtree(const char * geno)
-{
-	f4_node * root;
+f4_node* f4_processtree(const char* geno)
+{
+	f4_node *root;
 	int res;
 	root = new f4_node();
@@ -1628,5 +1624,5 @@
 		if (root->child)
 		{
-		char * buf = (char*)malloc(300);
+		char* buf = (char*)malloc(300);
 		DB(printf("(%d) ", root->child->count());)
 			buf[0] = 0;
Index: /cpp/frams/genetics/f4/f4_general.h
===================================================================
--- /cpp/frams/genetics/f4/f4_general.h	(revision 773)
+++ /cpp/frams/genetics/f4/f4_general.h	(revision 774)
@@ -21,5 +21,5 @@
  * @param v pointer to the decremented value
  */
-void rolling_dec(double * v);
+void rolling_dec(double *v);
 
 /**
@@ -27,5 +27,5 @@
  * @param v pointer to the incremented value
  */
-void rolling_inc(double * v);
+void rolling_inc(double *v);
 
 class f4_node;   // later
@@ -51,5 +51,5 @@
  * @return 1 if end of string was reached, or position of found character in sequence
  */
-int scanrec(const char * s, unsigned int slen, char stopchar);
+int scanrec(const char* s, unsigned int slen, char stopchar);
 
 
@@ -221,5 +221,4 @@
 
 	int          ctrl;             ///<neuron type
-	double       state;            ///<state of neuron
 	double       inertia;          ///<inertia of neuron
 	double       force;            ///<force of neuron
@@ -253,5 +252,4 @@
 
 
-// a collection of cells, like Organism, for developmental encoding
 /**
  * A class representing a collection of cells. It is equivalent to an organism.
@@ -295,5 +293,5 @@
 	 * Performs a single step of organism development. It runs each active cell
 	 * in the organism.
-	 * @return 0 if all cells are developed, 1 otherwise
+	 * @return 0 if all cells are developed, or 1 otherwise
 	 */
 	int  onestep();
@@ -336,5 +334,5 @@
 	 * @param parent the parent of a new element
 	 * @param insert the element to be inserted
-	 * @return 0 if repair can be performed, -1 otherwise (the repair flag wasn't set in constructor)
+	 * @return 0 if repair can be performed, or -1 otherwise because the repair flag wasn't set in the constructor
 	 */
 	int  setRepairInsert(int nerrpos, f4_node *parent, f4_node *insert);
@@ -432,5 +430,5 @@
 	 * @return pointer to the nth subnode or NULL if not found
 	 */
-	f4_node * ordNode(int n);
+	f4_node* ordNode(int n);
 
 	/**
@@ -438,5 +436,5 @@
 	 * @return random subnode
 	 */
-	f4_node * randomNode();
+	f4_node* randomNode();
 
 	/**
@@ -446,5 +444,5 @@
 	 * @return a random subnode with a given size or NULL
 	 */
-	f4_node * randomNodeWithSize(int min, int max);
+	f4_node* randomNodeWithSize(int min, int max);
 
 	/**
@@ -458,5 +456,5 @@
 	 * @return pointer to a tree copy
 	 */
-	f4_node * duplicate();
+	f4_node* duplicate();
 
 	/**
@@ -468,6 +466,4 @@
 };
 
-// convert f4 geno string to tree structure (internal)
-
 /**
  * The main function for converting a string of f4 encoding to a tree structure. Prepares
@@ -476,5 +472,5 @@
  * @return a pointer to the f4_node object representing the f4 tree root
  */
-f4_node * f4_processtree(const char *geno);
+f4_node* f4_processtree(const char *geno);
 
 /**
@@ -488,5 +484,5 @@
  * @param genot the string holding all the genotype
  * @param pos0 the current position of processing in string
- * @param current parent of the analysed branch of the genotype
+ * @param parent current parent of the analysed branch of the genotype
  * @return 0 if processing was successful, otherwise returns the position of an error in the genotype
  */
@@ -504,5 +500,5 @@
  * @return the pointer to the first character in string after connection definition
  */
-const char * parseConnection(const char *fragm, int &relfrom, double &weight);
+const char *parseConnection(const char *fragm, int &relfrom, double &weight);
 
 /**
@@ -518,5 +514,5 @@
  * @return the pointer to the first character in string after the connection definition
  */
-const char * parseConnectionWithNeuron(const char *fragm, string &neutype, double &weight);
+const char *parseConnectionWithNeuron(const char *fragm, string &neutype, double &weight);
 
 #endif
Index: /cpp/frams/genetics/f4/oper_f4.cpp
===================================================================
--- /cpp/frams/genetics/f4/oper_f4.cpp	(revision 773)
+++ /cpp/frams/genetics/f4/oper_f4.cpp	(revision 774)
@@ -67,5 +67,5 @@
 }
 
-int Geno_f4::ValidateRec(f4_node * geno, int retrycount) const
+int Geno_f4::ValidateRec(f4_node *geno, int retrycount) const
 {
 	// ! the genotype is geno->child (not geno) !
@@ -113,5 +113,5 @@
 
 
-int Geno_f4::checkValidity(const char * geno, const char *genoname)
+int Geno_f4::checkValidity(const char* geno, const char *genoname)
 {
 	f4_node root;
@@ -164,5 +164,5 @@
 			{
 				// make neuron
-				NeuroClass * rndclass = GenoOperators::getRandomNeuroClass();
+				NeuroClass *rndclass = GenoOperators::getRandomNeuroClass();
 				if (rndclass == NULL)
 				{
@@ -177,7 +177,7 @@
 						for (int i = 0; i < g->count(); i++)
 						{
-							f4_node * gcur = g->ordNode(i);
-							char * temp = (char*)gcur->name.c_str();
-							NeuroClass * neuclass = GenoOperators::parseNeuroClass(temp);
+							f4_node *gcur = g->ordNode(i);
+							char* temp = (char*)gcur->name.c_str();
+							NeuroClass *neuclass = GenoOperators::parseNeuroClass(temp);
 							if (neuclass != NULL)
 							{
@@ -215,7 +215,7 @@
 		{
 			// add link
-			f4_node * par = n1->parent;
-			char * temp = (char*)par->name.c_str();
-			NeuroClass * neuclass = GenoOperators::parseNeuroClass(temp);
+			f4_node *par = n1->parent;
+			char* temp = (char*)par->name.c_str();
+			NeuroClass *neuclass = GenoOperators::parseNeuroClass(temp);
 			if (neuclass != NULL)
 			{
@@ -456,5 +456,5 @@
 
 // change a [ node
-void Geno_f4::linkNodeChangeRandom(f4_node * nn, int neuid, std::vector<NeuroClass*> neulist) const      //rewritten by M.K. - should work as before (not tested)
+void Geno_f4::linkNodeChangeRandom(f4_node *nn, int neuid, std::vector<NeuroClass*> neulist) const      //rewritten by M.K. - should work as before (not tested)
 {
 	double probs[3] = { 0.1, 0.3, 0.6 };
@@ -495,5 +495,5 @@
 
 // make a random : node
-void Geno_f4::nparNodeMakeRandom(f4_node * nn) const
+void Geno_f4::nparNodeMakeRandom(f4_node *nn) const
 {
 	int sign = (int)(2.0f * rnd01);
@@ -505,5 +505,5 @@
 
 // change a repeat # node
-void Geno_f4::repeatNodeChangeRandom(f4_node * nn) const
+void Geno_f4::repeatNodeChangeRandom(f4_node *nn) const
 {
 	int count;
@@ -526,5 +526,5 @@
 	// ! the genotype is g->child (not g) !
 	int i, res;
-	f4_node * gcopy = NULL;
+	f4_node *gcopy = NULL;
 	// try this max 20 times:
 	//   copy, mutate, then validate
@@ -600,5 +600,5 @@
 
 // convert to tree
-f4_node * root;
+f4_node *root;
 root = new f4_node();
 res = f4_processrec(g, 0, root);
@@ -654,5 +654,5 @@
 
 
-int Geno_f4::CrossOverOne(f4_node * g1, f4_node * g2, float chg) const
+int Geno_f4::CrossOverOne(f4_node *g1, f4_node *g2, float chg) const
 {
 	// ! the genotypes are g1->child and g2->child (not g1 g2) !
@@ -660,5 +660,5 @@
 	int smin, smax;
 	float size;
-	f4_node * n1, *n2, *n1p, *n2p;
+	f4_node *n1, *n2, *n1p, *n2p;
 
 	// determine desired size
Index: /cpp/frams/genetics/f4/oper_f4.h
===================================================================
--- /cpp/frams/genetics/f4/oper_f4.h	(revision 773)
+++ /cpp/frams/genetics/f4/oper_f4.h	(revision 774)
@@ -63,5 +63,5 @@
 	 * @return GENOOPER_OK if genotype is valid, GENOPER_REPAIR if genotype can be repaired, GENOPER_OPFAIL if genotype can't be repaired
 	 */
-	int  ValidateRec(f4_node * geno, int retrycount) const;
+	int  ValidateRec(f4_node *geno, int retrycount) const;
 
 	/**
@@ -95,5 +95,5 @@
 	 * @param neulist list of genotype neuron classes
 	 */
-	void linkNodeMakeRandom(f4_node * nn, int neuid, std::vector<NeuroClass*> neulist) const;
+	void linkNodeMakeRandom(f4_node *nn, int neuid, std::vector<NeuroClass*> neulist) const;
 
 	/**
@@ -104,5 +104,5 @@
 	 * @param neulist list of genotype neuron classes
 	 */
-	void linkNodeChangeRandom(f4_node * nn, int neuid, std::vector<NeuroClass*> neulist) const;
+	void linkNodeChangeRandom(f4_node *nn, int neuid, std::vector<NeuroClass*> neulist) const;
 
 	/**
@@ -124,5 +124,5 @@
 	 * @return GENOPER_OK if performed successful mutation, GENOPER_FAIL otherwise
 	 */
-	int  MutateOneValid(f4_node * &g, int &method) const;
+	int  MutateOneValid(f4_node *&g, int &method) const;
 
 	/**
