Index: cpp/frams/_demos/genoconv_test.cpp
===================================================================
--- cpp/frams/_demos/genoconv_test.cpp	(revision 738)
+++ cpp/frams/_demos/genoconv_test.cpp	(revision 739)
@@ -116,4 +116,9 @@
 }
 
+static int goodWidthForFormat(int genotype_format)
+{
+	return genotype_format == '0' ? 45 : 15; // more space for long f0 lines
+}
+
 // arguments:
 //     genotype (or - meaning "read from stdin") [default: X]
@@ -182,23 +187,25 @@
 			printf("Conversion map:\n");
 			m.print();
-			printConvMap(g1.getGenes(), g2.getGenes(), m);
+			printConvMap(g1.getGenes(), g2.getGenes(), m, goodWidthForFormat(g1.getFormat()));
 			printf("Reverse conversion map:\n");
 			MultiMap rm;
 			rm.addReversed(m);
 			rm.print();
-			printConvMap(g2.getGenes(), g1.getGenes(), rm);
+			printConvMap(g2.getGenes(), g1.getGenes(), rm, goodWidthForFormat(g2.getFormat()));
 		}
 
 		Model mod1(g1, 1);
 		printf("\nModel map for f%c genotype:\n", g1.getFormat());
-		printModelMap(g1.getGenes(), mod1.getMap());
+		ModelDisplayMap dm1(mod1);
+		dm1.print(goodWidthForFormat(g1.getFormat()));
 		MultiMap mod1combined;
-		mod1combined.addCombined(mod1.getMap(), getModelDisplayMap());
+		mod1combined.addCombined(mod1.getMap(), dm1.getMap());
 		mod1combined.print();
 		Model mod2(g2, 1);
 		printf("\nModel map for f%c genotype:\n", g2.getFormat());
-		printModelMap(g2.getGenes(), mod2.getMap());
+		ModelDisplayMap dm2(mod2);
+		dm2.print(goodWidthForFormat(g2.getFormat()));
 		MultiMap mod2combined;
-		mod2combined.addCombined(mod2.getMap(), getModelDisplayMap());
+		mod2combined.addCombined(mod2.getMap(), dm2.getMap());
 		mod2combined.print();
 	}
Index: cpp/frams/_demos/printconvmap.cpp
===================================================================
--- cpp/frams/_demos/printconvmap.cpp	(revision 738)
+++ cpp/frams/_demos/printconvmap.cpp	(revision 739)
@@ -5,8 +5,4 @@
 #include "printconvmap.h"
 #include <stdio.h>
-#include <frams/util/multimap.h>
-#include <frams/model/model.h>
-
-#define GEN1MAX 15
 
 void printN(const char* t, int maxlen)
@@ -22,7 +18,7 @@
 }
 
-void printmapping(const char* gen1, int len1, const MultiRange &mr, const char* gen2, int len2)
+void printmapping(const char* gen1, int len1, const MultiRange &mr, const char* gen2, int len2, int left_column_padding)
 {
-	printN(' ', GEN1MAX - len1);
+	printN(' ', left_column_padding - len1);
 	printN(gen1, len1);
 	printf(" : ");
@@ -43,5 +39,5 @@
 }
 
-void printConvMap(const SString& gen1, const SString& gen2, const MultiMap& map)
+void printConvMap(const SString& gen1, const SString& gen2, const MultiMap& map, int left_column_padding)
 {
 	int y, y2, len1;
@@ -61,5 +57,5 @@
 	MultiRange *mr;
 	MultiRange emptyrange;
-	printN(' ', GEN1MAX);
+	printN(' ', left_column_padding);
 	printf("   %s\n", g2.c_str());
 	int begin = map.getBegin();
@@ -82,33 +78,39 @@
 			y2 = map.getMapping(id + 1)->begin;
 		}
-		if ((y2 - y) > GEN1MAX) y2 = y + GEN1MAX;
+		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());
+		printmapping(g + y, y2 - y, *mr, g2.c_str(), g2.len(), left_column_padding);
 		y = y2;
 	}
 }
 
-const MultiMap & getModelDisplayMap()
+ModelDisplayMap::ModelDisplayMap(Model &m)
+	:model(m)
 {
-	static MultiMap display_map;
-	if (display_map.isEmpty())
-	{
-		for (int i = 0; i < 10; i++)
-		{
-			display_map.add(Model::partToMap(i), Model::partToMap(i), i, i);
-			display_map.add(Model::jointToMap(i), Model::jointToMap(i), 10 + i, 10 + i);
-			display_map.add(Model::neuroToMap(i), Model::neuroToMap(i), 20 + i, 20 + i);
-		}
-	}
-	return display_map;
+	joint_offset = max(10, (int(9 + model.getPartCount()) / 10) * 10);
+	neuron_offset = joint_offset + max(10, (int(9 + model.getJointCount()) / 10) * 10);
+	max_element = neuron_offset + max(10, (int(9 + model.getNeuroCount()) / 10) * 10);
+	for (int i = 0; i < model.getPartCount(); i++)
+		map.add(Model::partToMap(i), Model::partToMap(i), i, i);
+	for (int i = 0; i < model.getJointCount(); i++)
+		map.add(Model::jointToMap(i), Model::jointToMap(i), joint_offset + i, joint_offset + i);
+	for (int i = 0; i < model.getNeuroCount(); i++)
+		map.add(Model::neuroToMap(i), Model::neuroToMap(i), neuron_offset + i, neuron_offset + i);
 }
 
-void printModelMap(const SString& gen1, const MultiMap& map)
+void ModelDisplayMap::print(int left_column_padding)
 {
 	MultiMap combined_map;
-	combined_map.addCombined(map, getModelDisplayMap());
-	SString g2("012345678901234567890123456789");
-	printN(' ', GEN1MAX);
-	printf("   Parts     Joints    Neurons\n");
-	printConvMap(gen1, g2, combined_map);
+	combined_map.addCombined(model.getMap(), getMap());
+	static const SString t09("0123456789");
+	SString g;
+	for (int i = 0; i < max_element; i += 10)
+		g += t09;
+	printN(' ', left_column_padding);
+	printf("   Parts     ");
+	printN(' ', joint_offset - 10);
+	printf("Joints    ");
+	printN(' ', (neuron_offset - joint_offset) - 10);
+	printf("Neurons\n");
+	printConvMap(model.getGeno().getGenes(), g, combined_map, left_column_padding);
 }
Index: cpp/frams/_demos/printconvmap.h
===================================================================
--- cpp/frams/_demos/printconvmap.h	(revision 738)
+++ cpp/frams/_demos/printconvmap.h	(revision 739)
@@ -7,10 +7,21 @@
 
 #include <frams/util/sstring.h>
+#include <frams/model/model.h>
+#include <frams/util/multimap.h>
 
 class MultiMap;
 
-void printConvMap(const SString& gen1, const SString& gen2, const MultiMap& map);
-void printModelMap(const SString& gen1, const MultiMap& map); //automaticaly combines the map with the ModelDisplayMap
-const MultiMap & getModelDisplayMap(); // mapping: true model -> display (so the regular map printing/debugging tools can be used for model maps, avoiding invonveniently huge numbers)
+void printConvMap(const SString& gen1, const SString& gen2, const MultiMap& map, int left_column_padding = 15);
+
+class ModelDisplayMap
+{
+	MultiMap map;
+	Model &model;
+	int joint_offset, neuron_offset, max_element;
+public:
+	ModelDisplayMap(Model &m);
+	void print(int left_column_padding = 15);
+	const MultiMap & getMap() { return map; } //mapping: true model -> display (so the regular map printing/debugging tools can be used for model maps, avoiding invonveniently huge numbers)
+};
 
 #endif
