diff --git a/src/Makefile.am b/src/Makefile.am
index 75239fcc58444e1dd3592413ce7548f2ae9a3ad3..793d020ae31b4acdb1d4390789c04d219f28dbb0 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -3,10 +3,10 @@ bin_PROGRAMS = openocd
 if ECOSBOARD
 MAINFILE = ecosboard.c
 else
-MAINFILE = main.c jim.c
+MAINFILE = main.c
 endif
 
-openocd_SOURCES = $(MAINFILE) openocd.c startup_tcl.c
+openocd_SOURCES = $(MAINFILE) openocd.c
 
 # set the include path found by configure
 INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/helper \
@@ -94,13 +94,3 @@ nobase_dist_pkglib_DATA = \
 	tcl/mmr_helpers.tcl  \
 	tcl/readable.tcl  
 
-noinst_PROGRAMS = bin2char
-
-bin2char_SOURCES = bin2char.c
-
-# Convert .tcl to cfile
-startup_tcl.c: bin2char startup.tcl
-	./bin2char startup_tcl < $(srcdir)/startup.tcl > startup_tcl.c
-
-# add startup_tcl.c to make clean list
-CLEANFILES = startup_tcl.c
diff --git a/src/flash/flash.c b/src/flash/flash.c
index 900fdbf9dc3f2bb3cb2739fa1b1e9724bd09bca4..01bc6e70b3a340bf53ee6db5a8b0b559751fc634 100644
--- a/src/flash/flash.c
+++ b/src/flash/flash.c
@@ -41,8 +41,7 @@
 #include <errno.h>
 #include <inttypes.h>
 
-#include "../jim.h"
-
+#include "jim.h"
 extern Jim_Interp *interp;
 
 
diff --git a/src/helper/Makefile.am b/src/helper/Makefile.am
index 8a2d472e9057a0ec5d5c752aff9b408b9a90bed2..2ba0a5630fa80b731913bcd6306cd26240c296f3 100644
--- a/src/helper/Makefile.am
+++ b/src/helper/Makefile.am
@@ -6,10 +6,24 @@ noinst_LIBRARIES = libhelper.a
 if ECOSBOARD
 CONFIGFILES = 
 else
-CONFIGFILES = options.c
+CONFIGFILES = options.c jim.c
 endif
 
 libhelper_a_SOURCES = binarybuffer.c $(CONFIGFILES) configuration.c log.c command.c time_support.c \
 	replacements.c fileio.c
 noinst_HEADERS = binarybuffer.h configuration.h types.h log.h command.h \
-	time_support.h replacements.h fileio.h
+	time_support.h replacements.h fileio.h \
+	jim.h
+
+libhelper_a_SOURCES += startup_tcl.c
+
+noinst_PROGRAMS = bin2char
+
+bin2char_SOURCES = bin2char.c
+
+# Convert .tcl to cfile
+startup_tcl.c: bin2char startup.tcl
+	./bin2char startup_tcl < $(srcdir)/startup.tcl > startup_tcl.c
+
+# add startup_tcl.c to make clean list
+CLEANFILES = startup_tcl.c
diff --git a/src/bin2char.c b/src/helper/bin2char.c
similarity index 100%
rename from src/bin2char.c
rename to src/helper/bin2char.c
diff --git a/src/jim.c b/src/helper/jim.c
similarity index 100%
rename from src/jim.c
rename to src/helper/jim.c
diff --git a/src/jim.h b/src/helper/jim.h
similarity index 100%
rename from src/jim.h
rename to src/helper/jim.h
diff --git a/src/startup.tcl b/src/helper/startup.tcl
similarity index 100%
rename from src/startup.tcl
rename to src/helper/startup.tcl
diff --git a/src/server/tcl_server.c b/src/server/tcl_server.c
index 2771254da80aa61f17cb378e170d85e0fa901d4b..a12442ea7d425a091a38292a6e6e67eaf81ed1c0 100644
--- a/src/server/tcl_server.c
+++ b/src/server/tcl_server.c
@@ -24,7 +24,7 @@
 #include <stdarg.h>
 #include "tcl_server.h"
 
-#include "../jim.h"
+#include "jim.h"
 #include "log.h"
 #include "command.h"