diff --git a/src/Makefile b/src/Makefile
index 544534f8a4ef39c6e646749269d7ad3b732cc37c..3a14917951ad612c4c27ac9ba792e0572a209704 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,5 +1,6 @@
 SUBDIRS := cluster sphere trapping
 SRCDIR=$(PWD)
+OBJDIR=$(SRCDIR)/objects
 BUILDDIR=$(SRCDIR)/../build
 DOCSDIR=$(SRCDIR)/../doc
 
@@ -12,14 +13,13 @@ $(SUBDIRS):
 	$(MAKE) -C $@
 
 clean:
-	rm -f $(BUILDDIR)/cluster/*.o
-	rm -f $(BUILDDIR)/sphere/*.o
-	rm -f $(BUILDDIR)/trapping/*.o
+	rm -f $(OBJDIR)/*.o
 
 wipe:
 	rm -f $(BUILDDIR)/cluster/*
 	rm -f $(BUILDDIR)/sphere/*
 	rm -f $(BUILDDIR)/trapping/*
+	rm -f $(OBJDIR)/*.o
 	if [ -d $(DOCSDIR)/build/html ]; then rm -r $(DOCSDIR)/build/html; fi
 	if [ -d $(DOCSDIR)/build/latex ]; then rm -r $(DOCSDIR)/build/latex; fi
 
diff --git a/src/cluster/Makefile b/src/cluster/Makefile
index 49e2fe59d5bc48d6fadbaac1a30415c218474b19..7101fa7bc5855d4d1be6f8abc739bbd31f9c203b 100644
--- a/src/cluster/Makefile
+++ b/src/cluster/Makefile
@@ -1,46 +1,31 @@
-BUILDDIR=../../build/cluster
+ifndef BUILDDIR
+override BUILDDIR=../../build/cluster
+endif
+ifndef OBJDIR
+override OBJDIR=../objects
+endif
 
 include ../make.inc
 
+F_CLU_OBJS=$(OBJDIR)/clu.o $(OBJDIR)/edfb_clu.o
 
-all: clu edfb_clu np_cluster
+CXX_CLU_OBJS=$(OBJDIR)/np_cluster.o $(OBJDIR)/Commons.o $(OBJDIR)/Configuration.o $(OBJDIR)/file_io.o $(OBJDIR)/Parsers.o $(OBJDIR)/sph_subs.o $(OBJDIR)/clu_subs.o $(OBJDIR)/cluster.o
 
-clu: clu.o
-	$(FC) $(FCFLAGS) -o $(BUILDDIR)/clu $(BUILDDIR)/clu.o $(LDFLAGS)
 
-edfb_clu: edfb_clu.o
-	$(FC) $(FCFLAGS) -o $(BUILDDIR)/edfb_clu $(BUILDDIR)/edfb_clu.o $(LDFLAGS)
+all: $(BUILDDIR)/clu $(BUILDDIR)/edfb_clu $(BUILDDIR)/np_cluster
 
-np_cluster: $(BUILDDIR)/np_cluster.o $(BUILDDIR)/Commons.o $(BUILDDIR)/Configuration.o $(BUILDDIR)/file_io.o $(BUILDDIR)/Parsers.o $(BUILDDIR)/sph_subs.o $(BUILDDIR)/clu_subs.o $(BUILDDIR)/cluster.o
-	$(CXX) $(CXXFLAGS) -o $(BUILDDIR)/np_cluster $(BUILDDIR)/np_cluster.o $(BUILDDIR)/Commons.o $(BUILDDIR)/Configuration.o $(BUILDDIR)/file_io.o $(BUILDDIR)/Parsers.o $(BUILDDIR)/sph_subs.o $(BUILDDIR)/clu_subs.o $(BUILDDIR)/cluster.o $(CXXLDFLAGS) 
+$(BUILDDIR)/clu: $(OBJDIR)/clu.o
+	$(FC) $(FCFLAGS) -o $(BUILDDIR)/clu $(OBJDIR)/clu.o $(LDFLAGS)
 
-#$(BUILDDIR)/np_cluster.o:
-#	$(CXX) $(CXXFLAGS) -c np_cluster.cpp -o $(BUILDDIR)/np_cluster.o
+$(BUILDDIR)/edfb_clu: $(OBJDIR)/edfb_clu.o
+	$(FC) $(FCFLAGS) -o $(BUILDDIR)/edfb_clu $(OBJDIR)/edfb_clu.o $(LDFLAGS)
 
-#$(BUILDDIR)/Commons.o:
-#	$(CXX) $(CXXFLAGS) -c ../libnptm/Commons.cpp -o $(BUILDDIR)/Commons.o
-
-#$(BUILDDIR)/Configuration.o:
-#	$(CXX) $(CXXFLAGS) -c ../libnptm/Configuration.cpp -o $(BUILDDIR)/Configuration.o
-
-#$(BUILDDIR)/file_io.o:
-#	$(CXX) $(CXXFLAGS) -c ../libnptm/file_io.cpp -o $(BUILDDIR)/file_io.o
-
-#$(BUILDDIR)/Parsers.o:
-#	$(CXX) $(CXXFLAGS) -c ../libnptm/Parsers.cpp -o $(BUILDDIR)/Parsers.o
-
-#$(BUILDDIR)/cluster.o:
-#	$(CXX) $(CXXFLAGS) -c cluster.cpp -o $(BUILDDIR)/cluster.o
-
-#$(BUILDDIR)/clu_subs.o:
-#	$(CXX) $(CXXFLAGS) -c ../libnptm/clu_subs.cpp -o $(BUILDDIR)/clu_subs.o
-
-#$(BUILDDIR)/sph_subs.o:
-#	$(CXX) $(CXXFLAGS) -c ../libnptm/sph_subs.cpp -o $(BUILDDIR)/sph_subs.o
+$(BUILDDIR)/np_cluster: $(CXX_CLU_OBJS)
+	$(CXX) $(CXXFLAGS) -o $(BUILDDIR)/np_cluster $(CXX_CLU_OBJS) $(CXXLDFLAGS) 
 
 clean:
-	rm -f $(BUILDDIR)/*.o
+	rm -f $(F_CLU_OBJS) $(CXX_CLU_OBJS)
 
 wipe:
-	rm -f $(BUILDDIR)/clu $(BUILDDIR)/edfb_clu $(BUILDDIR)/*.o
+	rm -f $(BUILDDIR)/clu $(BUILDDIR)/edfb_clu $(F_CLU_OBJS) $(CXX_CLU_OBJS)
 
diff --git a/src/make.inc b/src/make.inc
index 4dd67a1420877749f14490f4463781f788be16aa..39a5c949fcfc77b17e16c160caacab009a584a13 100644
--- a/src/make.inc
+++ b/src/make.inc
@@ -41,13 +41,16 @@ override CXXLDFLAGS=-L/usr/lib64 -L$(HDF5_LIB) -lhdf5 $(LDFLAGS)
 endif
 
 %.o : %.f
-	$(FC) $(FCFLAGS) -c -o $(BUILDDIR)/$@ $<
+	$(FC) $(FCFLAGS) -c -o $(OBJDIR)/$@ $<
 
 %.o : %.cpp
-	$(CXX) $(CXXFLAGS) -c -o $(BUILDDIR)/$@ $<
+	$(CXX) $(CXXFLAGS) -c -o $(OBJDIR)/$@ $<
 
-$(BUILDDIR)/%.o : %.cpp
-	$(CXX) $(CXXFLAGS) -c -o $(BUILDDIR)/$@ $<
+$(OBJDIR)/%.o : %.f
+	$(FC) $(FCFLAGS) -c -o $(OBJDIR)/$@ $<
 
-$(BUILDDIR)/%.o : ../libnptm/%.cpp
-	$(CXX) $(CXXFLAGS) -c -o $(BUILDDIR)/$@ ../libnptm/$<
+$(OBJDIR)/%.o : %.cpp
+	$(CXX) $(CXXFLAGS) -c -o $(OBJDIR)/$@ $<
+
+$(OBJDIR)/%.o : ../libnptm/%.cpp
+	$(CXX) $(CXXFLAGS) -c -o $(OBJDIR)/$@ ../libnptm/$<
diff --git a/src/objects/Commons.o b/src/objects/Commons.o
new file mode 100644
index 0000000000000000000000000000000000000000..0d13bbe4394e60e7c9a0623ae92f7834a36eecba
Binary files /dev/null and b/src/objects/Commons.o differ
diff --git a/src/objects/Configuration.o b/src/objects/Configuration.o
new file mode 100644
index 0000000000000000000000000000000000000000..11b5d40b1f46fc21f1332f06567a5e242f424d9c
Binary files /dev/null and b/src/objects/Configuration.o differ
diff --git a/src/objects/Parsers.o b/src/objects/Parsers.o
new file mode 100644
index 0000000000000000000000000000000000000000..477229505e75e642977ce3ba22ca92ea7cc1763d
Binary files /dev/null and b/src/objects/Parsers.o differ
diff --git a/src/objects/cfrfme.o b/src/objects/cfrfme.o
new file mode 100644
index 0000000000000000000000000000000000000000..3928b17fc4261475c696d55dd8e9e63fe130128f
Binary files /dev/null and b/src/objects/cfrfme.o differ
diff --git a/src/objects/clffft.o b/src/objects/clffft.o
new file mode 100644
index 0000000000000000000000000000000000000000..28ae403f5d31d40dde00721b6d44902554061893
Binary files /dev/null and b/src/objects/clffft.o differ
diff --git a/src/objects/clu.o b/src/objects/clu.o
new file mode 100644
index 0000000000000000000000000000000000000000..80a588066f143154a68cd4007321aca2cab2ac2d
Binary files /dev/null and b/src/objects/clu.o differ
diff --git a/src/objects/clu_subs.o b/src/objects/clu_subs.o
new file mode 100644
index 0000000000000000000000000000000000000000..0a878f2b45e8ff44806cefd7727f23e4f914ffa3
Binary files /dev/null and b/src/objects/clu_subs.o differ
diff --git a/src/objects/cluster.o b/src/objects/cluster.o
new file mode 100644
index 0000000000000000000000000000000000000000..62cc2bac0c9507c581a18fa8f99559856dea0d25
Binary files /dev/null and b/src/objects/cluster.o differ
diff --git a/src/objects/edfb_clu.o b/src/objects/edfb_clu.o
new file mode 100644
index 0000000000000000000000000000000000000000..8a575c91ab8974a2da79499e525eacebad062a38
Binary files /dev/null and b/src/objects/edfb_clu.o differ
diff --git a/src/objects/edfb_sph.o b/src/objects/edfb_sph.o
new file mode 100644
index 0000000000000000000000000000000000000000..eb17e42f63e5e92ca32524e93dbedc88423aab96
Binary files /dev/null and b/src/objects/edfb_sph.o differ
diff --git a/src/objects/file_io.o b/src/objects/file_io.o
new file mode 100644
index 0000000000000000000000000000000000000000..dd35861b7e28b9b66cc4b90cb1efb93dfbfbaea2
Binary files /dev/null and b/src/objects/file_io.o differ
diff --git a/src/objects/frfme.o b/src/objects/frfme.o
new file mode 100644
index 0000000000000000000000000000000000000000..9d824c4e0505da72197aa46401b9dd14859843ed
Binary files /dev/null and b/src/objects/frfme.o differ
diff --git a/src/objects/lffft.o b/src/objects/lffft.o
new file mode 100644
index 0000000000000000000000000000000000000000..a93a38c2d706ff69c02dcd2d64703ef5ed45817d
Binary files /dev/null and b/src/objects/lffft.o differ
diff --git a/src/objects/np_cluster.o b/src/objects/np_cluster.o
new file mode 100644
index 0000000000000000000000000000000000000000..96a072d349e6fb22e7d682e069e1482fa3ea049f
Binary files /dev/null and b/src/objects/np_cluster.o differ
diff --git a/src/objects/np_sphere.o b/src/objects/np_sphere.o
new file mode 100644
index 0000000000000000000000000000000000000000..e39def51abe6ea28c4a28c0932efcacf04c80993
Binary files /dev/null and b/src/objects/np_sphere.o differ
diff --git a/src/objects/np_trapping.o b/src/objects/np_trapping.o
new file mode 100644
index 0000000000000000000000000000000000000000..c3a72a25867863344700ed25feddbdd462bce4e9
Binary files /dev/null and b/src/objects/np_trapping.o differ
diff --git a/src/objects/sph.o b/src/objects/sph.o
new file mode 100644
index 0000000000000000000000000000000000000000..77bca7033f64aca4997896aa3cd63dad77cffcb2
Binary files /dev/null and b/src/objects/sph.o differ
diff --git a/src/objects/sph_subs.o b/src/objects/sph_subs.o
new file mode 100644
index 0000000000000000000000000000000000000000..97cc693aac20cdedbc1111fb277052fa222ca1ee
Binary files /dev/null and b/src/objects/sph_subs.o differ
diff --git a/src/objects/sphere.o b/src/objects/sphere.o
new file mode 100644
index 0000000000000000000000000000000000000000..56a7446bcd3bae5072c5f548917a54eb68871cdb
Binary files /dev/null and b/src/objects/sphere.o differ
diff --git a/src/objects/tra_subs.o b/src/objects/tra_subs.o
new file mode 100644
index 0000000000000000000000000000000000000000..8f6deba3d6477415916a793d6314e2ee95a39e8f
Binary files /dev/null and b/src/objects/tra_subs.o differ
diff --git a/src/sphere/Makefile b/src/sphere/Makefile
index c2e8b5c5fb609308557866c19ec08850b17b27ba..49a53b6826421251b5780114f1086f9af292acc1 100644
--- a/src/sphere/Makefile
+++ b/src/sphere/Makefile
@@ -1,49 +1,31 @@
-BUILDDIR=../../build/sphere
+ifndef BUILDDIR
+override BUILDDIR=../../build/sphere
+endif
+ifndef OBJDIR
+override OBJDIR=../objects
+endif
 
 include ../make.inc
 
-#FC=gfortran
-#FCFLAGS=-std=legacy -O3
-#LFLAGS=
-#CXX=g++
-#CXXFLAGS=-O2 -ggdb -pg -coverage
-#CXXLFLAGS=-L/usr/lib64 -lhdf5_hl -lhdf5
+F_SPH_OBJS=$(OBJDIR)/edfb_sph.o $(OBJDIR)/sph.o
 
-all: edfb_sph sph np_sphere
+CXX_SPH_OBJS=$(OBJDIR)/np_sphere.o $(OBJDIR)/Commons.o $(OBJDIR)/Configuration.o $(OBJDIR)/file_io.o $(OBJDIR)/Parsers.o $(OBJDIR)/sph_subs.o $(OBJDIR)/sphere.o
 
-edfb_sph: edfb_sph.o
-	$(FC) $(FCFLAGS) -o $(BUILDDIR)/edfb_sph $(BUILDDIR)/edfb_sph.o $(LDFLAGS)
 
-sph: sph.o
-	$(FC) $(FCFLAGS) -o $(BUILDDIR)/sph $(BUILDDIR)/sph.o $(LDFLAGS)
+all: $(BUILDDIR)/edfb_sph $(BUILDDIR)/sph $(BUILDDIR)/np_sphere
 
-np_sphere: $(BUILDDIR)/np_sphere.o $(BUILDDIR)/Commons.o $(BUILDDIR)/Configuration.o $(BUILDDIR)/file_io.o $(BUILDDIR)/Parsers.o $(BUILDDIR)/sph_subs.o $(BUILDDIR)/sphere.o
-	$(CXX) $(CXXFLAGS) -o $(BUILDDIR)/np_sphere $(BUILDDIR)/np_sphere.o $(BUILDDIR)/Commons.o $(BUILDDIR)/Configuration.o $(BUILDDIR)/file_io.o $(BUILDDIR)/Parsers.o $(BUILDDIR)/sph_subs.o $(BUILDDIR)/sphere.o $(CXXLDFLAGS) 
+$(BUILDDIR)/edfb_sph: $(OBJDIR)/edfb_sph.o
+	$(FC) $(FCFLAGS) -o $(BUILDDIR)/edfb_sph $(OBJDIR)/edfb_sph.o $(LDFLAGS)
 
-#$(BUILDDIR)/np_sphere.o:
-#	$(CXX) $(CXXFLAGS) -c np_sphere.cpp -o $(BUILDDIR)/np_sphere.o
+$(BUILDDIR)/sph: $(OBJDIR)/sph.o
+	$(FC) $(FCFLAGS) -o $(BUILDDIR)/sph $(OBJDIR)/sph.o $(LDFLAGS)
 
-#$(BUILDDIR)/Commons.o:
-#	$(CXX) $(CXXFLAGS) -c ../libnptm/Commons.cpp -o $(BUILDDIR)/Commons.o
-
-#$(BUILDDIR)/Configuration.o:
-#	$(CXX) $(CXXFLAGS) -c ../libnptm/Configuration.cpp -o $(BUILDDIR)/Configuration.o
-
-#$(BUILDDIR)/file_io.o:
-#	$(CXX) $(CXXFLAGS) -c ../libnptm/file_io.cpp -o $(BUILDDIR)/file_io.o
-
-#$(BUILDDIR)/Parsers.o:
-#	$(CXX) $(CXXFLAGS) -c ../libnptm/Parsers.cpp -o $(BUILDDIR)/Parsers.o
-
-#$(BUILDDIR)/sph_subs.o:
-#	$(CXX) $(CXXFLAGS) -c ../libnptm/sph_subs.cpp -o $(BUILDDIR)/sph_subs.o
-
-#$(BUILDDIR)/sphere.o:
-#	$(CXX) $(CXXFLAGS) -c sphere.cpp -o $(BUILDDIR)/sphere.o
+$(BUILDDIR)/np_sphere: $(CXX_SPH_OBJS)
+	$(CXX) $(CXXFLAGS) -o $(BUILDDIR)/np_sphere $(CXX_SPH_OBJS) $(CXXLDFLAGS) 
 
 clean:
-	rm -f $(BUILDDIR)/*.o
+	rm -f $(F_SPH_OBJS) $(CXX_SPH_OBJS)
 
 wipe:
-	rm -f $(BUILDDIR)/edfb_sph $(BUILDDIR)/sph $(BUILDDIR)/*.o
+	rm -f $(BUILDDIR)/edfb_sph $(BUILDDIR)/sph $(F_SPH_OBJS) $(CXX_SPH_OBJS)
 
diff --git a/src/trapping/Makefile b/src/trapping/Makefile
index 10d5bb8b8e39f0b69326bb1ddfc378d0d076fc75..4a4b58346cddb11dbdd1f5765c9771b117548398 100644
--- a/src/trapping/Makefile
+++ b/src/trapping/Makefile
@@ -1,55 +1,30 @@
-BUILDDIR=../../build/trapping
+ifndef BUILDDIR
+override BUILDDIR=../../build/trapping
+endif
+ifndef OBJDIR
+override OBJDIR=../objects
+endif
 
 include ../make.inc
 
-#FC=gfortran
-#FCFLAGS=-std=legacy -O3
-#LFLAGS=
-#CXX=g++
-#CXXFLAGS=-O2 -ggdb -pg -coverage
-#CXXLFLAGS=-L/usr/lib64 -lhdf5_hl -lhdf5
+F_TRAP_OBJS=$(OBJDIR)/frfme.o $(OBJDIR)/lffft.o
 
-all: frfme lffft np_trapping
+CXX_TRAP_OBJS=$(OBJDIR)/np_trapping.o $(OBJDIR)/cfrfme.o $(OBJDIR)/clffft.o $(OBJDIR)/Parsers.o $(OBJDIR)/Commons.o $(OBJDIR)/Configuration.o $(OBJDIR)/file_io.o $(OBJDIR)/sph_subs.o $(OBJDIR)/tra_subs.o
 
-frfme: frfme.o
-	$(FC) $(FCFLAGS) -o $(BUILDDIR)/frfme $(BUILDDIR)/frfme.o $(LDFLAGS)
+all: $(BUILDDIR)/frfme $(BUILDDIR)/lffft $(BUILDDIR)/np_trapping
 
-lffft: lffft.o
-	$(FC) $(FCFLAGS) -o $(BUILDDIR)/lffft $(BUILDDIR)/lffft.o $(LDFLAGS)
+$(BUILDDIR)/frfme: $(OBJDIR)/frfme.o
+	$(FC) $(FCFLAGS) -o $(BUILDDIR)/frfme $(OBJDIR)/frfme.o $(LDFLAGS)
 
-np_trapping: $(BUILDDIR)/np_trapping.o $(BUILDDIR)/cfrfme.o $(BUILDDIR)/clffft.o $(BUILDDIR)/Parsers.o $(BUILDDIR)/Commons.o $(BUILDDIR)/Configuration.o $(BUILDDIR)/file_io.o $(BUILDDIR)/sph_subs.o $(BUILDDIR)/tra_subs.o
-	$(CXX) $(CXXFLAGS) -o $(BUILDDIR)/np_trapping $(BUILDDIR)/np_trapping.o $(BUILDDIR)/cfrfme.o $(BUILDDIR)/clffft.o $(BUILDDIR)/file_io.o $(BUILDDIR)/Parsers.o $(BUILDDIR)/Commons.o $(BUILDDIR)/Configuration.o $(BUILDDIR)/sph_subs.o $(BUILDDIR)/tra_subs.o $(CXXLDFLAGS) 
+$(BUILDDIR)/lffft: $(OBJDIR)/lffft.o
+	$(FC) $(FCFLAGS) -o $(BUILDDIR)/lffft $(OBJDIR)/lffft.o $(LDFLAGS)
 
-#$(BUILDDIR)/np_trapping.o:
-#	$(CXX) $(CXXFLAGS) np_trapping.cpp -c -o $(BUILDDIR)/np_trapping.o
-
-#$(BUILDDIR)/cfrfme.o:
-#	$(CXX) $(CXXFLAGS) frfme.cpp -c -o $(BUILDDIR)/cfrfme.o
-
-#$(BUILDDIR)/clffft.o:
-#	$(CXX) $(CXXFLAGS) lffft.cpp -c -o $(BUILDDIR)/clffft.o
-
-#$(BUILDDIR)/Commons.o:
-#	$(CXX) $(CXXFLAGS) ../libnptm/Commons.cpp -c -o $(BUILDDIR)/Commons.o
-
-#$(BUILDDIR)/Configuration.o:
-#	$(CXX) $(CXXFLAGS) ../libnptm/Configuration.cpp -c -o $(BUILDDIR)/Configuration.o
-
-#$(BUILDDIR)/file_io.o:
-#	$(CXX) $(CXXFLAGS) -c ../libnptm/file_io.cpp -o $(BUILDDIR)/file_io.o
-
-#$(BUILDDIR)/Parsers.o:
-#	$(CXX) $(CXXFLAGS) ../libnptm/Parsers.cpp -c -o $(BUILDDIR)/Parsers.o
-
-#$(BUILDDIR)/sph_subs.o:
-#	$(CXX) $(CXXFLAGS) ../libnptm/sph_subs.cpp -c -o $(BUILDDIR)/sph_subs.o
-
-#$(BUILDDIR)/tra_subs.o:
-#	$(CXX) $(CXXFLAGS) ../libnptm/tra_subs.cpp -c -o $(BUILDDIR)/tra_subs.o
+$(BUILDDIR)/np_trapping: $(CXX_TRAP_OBJS)
+	$(CXX) $(CXXFLAGS) -o $(BUILDDIR)/np_trapping $(CXX_TRAP_OBJS) $(CXXLDFLAGS) 
 
 clean:
-	rm -f $(BUILDDIR)/*.o
+	rm -f $(F_TRAP_OBJS) $(CXX_TRAP_OBJS)
 
 wipe:
-	rm -f $(BUILDDIR)/frfme $(BUILDDIR)/lffft $(BUILDDIR)/*.o
+	rm -f $(BUILDDIR)/frfme $(BUILDDIR)/lffft $(F_TRAP_OBJS) $(CXX_TRAP_OBJS)