diff --git a/Makefile b/Makefile
index 24316b0be7dca93532dd364987919e61b6387cac..68b665cdedaaa607f9b299093f5e461f4abb44b4 100644
--- a/Makefile
+++ b/Makefile
@@ -57,17 +57,18 @@ LIB_DESTDIR = lib
 ####### 4) Compiler, tools and options
 
 CXX ?= g++
+CC ?= gcc
 #Insert the optional parameter to the compiler. The CFLAGS could be changed externally by the user
-CFLAGS ?= -O2 -fPIC
+CFLAGS ?= -O3 -fPIC
+CXXFLAGS ?= -O3 -fPIC
 #Set INCPATH to add the inclusion paths
 INCPATH = -I ./include
 #Insert the implicit parameter to the compiler:
-ALL_CFLAGS = -fexceptions -Wall $(INCPATH) $(CFLAGS)
+ALL_CFLAGS = -fexceptions -Wall $(INCPATH)
 ifeq ($(SYSTEM), QNX)
 	ALL_CFLAGS += -Vgcc_ntox86_gpp -lang-c++
 endif
-#Use CPPFLAGS for the preprocessor
-CPPFLAGS ?=
+
 #Set LIBS for addition library
 LIBS = -lstdc++ 
 ifeq ($(SYSTEM), QNX)
@@ -75,7 +76,7 @@ ifeq ($(SYSTEM), QNX)
 endif
 ifneq (, $(findstring apple, $(SYSTEM)))
  	# Do apple things
-	CPPFLAGS += -I$(LOCAL)/include
+	ALL_CFLAGS += -I$(LOCAL)/include
 	LIBS += -L$(LOCAL)/lib
 endif 
 
@@ -128,13 +129,13 @@ $(shell  cut $(INCLUDE_DIR)/$(VER_FILE_NAME) -f 3 > version)
 ####### 9) Pattern rules
 
 test/%.o : test/%.cpp
-	$(CXX) $(CPPFLAGS) $(ALL_CFLAGS) -c $< -o $@ -I /usr/include/cppunit
+	$(CXX) $(CXXFLAGS) $(ALL_CFLAGS) -c $< -o $@ -I /usr/include/cppunit
 
 %.o : %.cpp | makeobjdir
-	$(CXX) $(CPPFLAGS) $(ALL_CFLAGS) -c $< -o $(OBJECTS_DIR)/$@
+	$(CXX) $(CXXFLAGS) $(ALL_CFLAGS) -c $< -o $(OBJECTS_DIR)/$@
 
 %.o : %.c | makeobjdir
-	$(CC) $(CPPFLAGS) $(ALL_CFLAGS) -c $< -o $(OBJECTS_DIR)/$@
+	$(CC) $(CFLAGS) $(ALL_CFLAGS) -c $< -o $(OBJECTS_DIR)/$@
 
 #only for documentation generation
 $(DOXY_SOURCE_DIR)/%.h : %.h
@@ -152,14 +153,14 @@ lib: staticlib
 	
 exe: main.o $(OBJECTS)
 		test -d $(EXE_DESTDIR) || mkdir -p $(EXE_DESTDIR)
-		$(CXX) $(CPPFLAGS) $(ALL_CFLAGS) -o $(EXE_DESTDIR)/$(EXE_NAME) $(OBJECTS_DIR)/*.o $(LIBS)
+		$(CXX) $(CXXFLAGS) $(ALL_CFLAGS) -o $(EXE_DESTDIR)/$(EXE_NAME) $(OBJECTS_DIR)/*.o $(LIBS)
 	
 tests: test/runtests
 
 TESTOBJS = test/InputPacketStreamFileTest.o test/runtests.o
 
 test/runtests: $(TESTOBJS) lib
-	$(CXX) $(CPPFLAGS) $(ALL_CFLAGS) -o $@ $(TESTOBJS) -Llib -lpacket $(LIBS) -lcppunit
+	$(CXX) $(CXXFLAGS) $(ALL_CFLAGS) -o $@ $(TESTOBJS) -Llib -lpacket $(LIBS) -lcppunit
 
 staticlib: $(OBJECTS)
 		test -d $(LIB_DESTDIR) || mkdir -p $(LIB_DESTDIR)	
diff --git a/PacketLib.xcodeproj/project.xcworkspace/xcshareddata/PacketLib.xccheckout b/PacketLib.xcodeproj/project.xcworkspace/xcshareddata/PacketLib.xccheckout
index d6548caed0c38ef0d9fd18a7eca12e6a331af655..b8411a5f681b015dbf026a2202e1fb0ee0e984a1 100644
--- a/PacketLib.xcodeproj/project.xcworkspace/xcshareddata/PacketLib.xccheckout
+++ b/PacketLib.xcodeproj/project.xcworkspace/xcshareddata/PacketLib.xccheckout
@@ -10,29 +10,29 @@
 	<string>PacketLib</string>
 	<key>IDESourceControlProjectOriginsDictionary</key>
 	<dict>
-		<key>9D31E5C7-D3D6-4986-9D5E-784921CDF7E3</key>
+		<key>87AE3A47C426A969B4ECB716011DCD84ED0D145E</key>
 		<string>ssh://github.com/ASTRO-BO/PacketLib.git</string>
 	</dict>
 	<key>IDESourceControlProjectPath</key>
 	<string>PacketLib.xcodeproj/project.xcworkspace</string>
 	<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
 	<dict>
-		<key>9D31E5C7-D3D6-4986-9D5E-784921CDF7E3</key>
+		<key>87AE3A47C426A969B4ECB716011DCD84ED0D145E</key>
 		<string>../..</string>
 	</dict>
 	<key>IDESourceControlProjectURL</key>
 	<string>ssh://github.com/ASTRO-BO/PacketLib.git</string>
 	<key>IDESourceControlProjectVersion</key>
-	<integer>110</integer>
+	<integer>111</integer>
 	<key>IDESourceControlProjectWCCIdentifier</key>
-	<string>9D31E5C7-D3D6-4986-9D5E-784921CDF7E3</string>
+	<string>87AE3A47C426A969B4ECB716011DCD84ED0D145E</string>
 	<key>IDESourceControlProjectWCConfigurations</key>
 	<array>
 		<dict>
 			<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
 			<string>public.vcs.git</string>
 			<key>IDESourceControlWCCIdentifierKey</key>
-			<string>9D31E5C7-D3D6-4986-9D5E-784921CDF7E3</string>
+			<string>87AE3A47C426A969B4ECB716011DCD84ED0D145E</string>
 			<key>IDESourceControlWCCName</key>
 			<string>PacketLib</string>
 		</dict>
diff --git a/PacketLib.xcodeproj/project.xcworkspace/xcuserdata/bulgarelli.xcuserdatad/UserInterfaceState.xcuserstate b/PacketLib.xcodeproj/project.xcworkspace/xcuserdata/bulgarelli.xcuserdatad/UserInterfaceState.xcuserstate
index b45555a2d7614c85180ced1f60d3ebc413bc32f4..e03c4e99a338d92042030a7fa38adf5c78246be3 100644
Binary files a/PacketLib.xcodeproj/project.xcworkspace/xcuserdata/bulgarelli.xcuserdatad/UserInterfaceState.xcuserstate and b/PacketLib.xcodeproj/project.xcworkspace/xcuserdata/bulgarelli.xcuserdatad/UserInterfaceState.xcuserstate differ