diff --git a/test/StressTest.thrift b/test/StressTest.thrift
index a1f909c..3cce4eb 100644
--- a/test/StressTest.thrift
+++ b/test/StressTest.thrift
@@ -4,10 +4,10 @@
 
   void echoVoid(),
   byte echoByte(byte arg),
-  u16 echoU16(u16 arg),
-  u32 echoU32(u32 arg),
-  u64 echoU64(u64 arg),
-  i16 echoI16(i16 arg),
+//  u16 echoU16(u16 arg),
+//  u32 echoU32(u32 arg),
+//  u64 echoU64(u64 arg),
+//  i16 echoI16(i16 arg),
   i32 echoI32(i32 arg),
   i64 echoI64(i64 arg),
   string echoString(string arg),
diff --git a/test/ThriftTest.thrift b/test/ThriftTest.thrift
index 50021ba..c90a507 100644
--- a/test/ThriftTest.thrift
+++ b/test/ThriftTest.thrift
@@ -14,10 +14,10 @@
 
 struct Xtruct
 {
-  string string_thing = 0,
-  byte   byte_thing = 1,
-  i32    i32_thing = 3,
-  i64    i64_thing = 5
+  string string_thing = 1,
+  byte   byte_thing = 4,
+  i32    i32_thing = 9,
+  i64    i64_thing = 11
 }
 
 struct Xtruct2
@@ -34,43 +34,44 @@
 }
 
 exception Xception {
-    u32 errorCode,
+    i32 errorCode,
     string message
 }
 
 exception Xception2 {
-    u32 errorCode,
+    i32 errorCode,
     Xtruct struct_thing
 }
  
-struct Empty {}
+struct EmptyStruct {}
+
 struct OneField {
-   Empty field
+   EmptyStruct field
 }
 
 service ThriftTest
 {
   void         testVoid(),
-  string       testString(string thing = 0),
-  byte         testByte(byte thing = 0),
-  i32          testI32(i32 thing = 0),
-  i64          testI64(i64 thing = 0),
-  Xtruct       testStruct(Xtruct thing = 0),
-  Xtruct2      testNest(Xtruct2 thing = 0),
-  map<i32,i32> testMap(map<i32,i32> thing = 0),
-  set<i32>     testSet(set<i32> thing = 0),
-  list<i32>    testList(list<i32> thing = 0),
-  Numberz      testEnum(Numberz thing = 0),
-  UserId       testTypedef(UserId thing = 0),
+  string       testString(string thing = 1),
+  byte         testByte(byte thing = 1),
+  i32          testI32(i32 thing = 1),
+  i64          testI64(i64 thing = 1),
+  Xtruct       testStruct(Xtruct thing = 1),
+  Xtruct2      testNest(Xtruct2 thing = 1),
+  map<i32,i32> testMap(map<i32,i32> thing = 1),
+  set<i32>     testSet(set<i32> thing = 1),
+  list<i32>    testList(list<i32> thing = 1),
+  Numberz      testEnum(Numberz thing = 1),
+  UserId       testTypedef(UserId thing = 1),
 
-  map<i32,map<i32,i32>> testMapMap(i32 hello = 0),
+  map<i32,map<i32,i32>> testMapMap(i32 hello = 1),
 
   /* So you think you've got this all worked, out eh? */
-  map<UserId, map<Numberz,Insanity>> testInsanity(Insanity argument = 0),
+  map<UserId, map<Numberz,Insanity>> testInsanity(Insanity argument = 1),
 
   /* Multiple parameters */
   
-  Xtruct	testMulti(byte arg0, i32 arg1, u64 arg2, map<i16, string> arg3, Numberz arg4, UserId arg5),
+  Xtruct	testMulti(byte arg0, i32 arg1, i64 arg2, map<i16, string> arg3, Numberz arg4, UserId arg5),
 
   /* Exception specifier */
 
diff --git a/test/cpp/Makefile.thrift b/test/cpp/Makefile.thrift
index f95401c..ddd6b2e 100644
--- a/test/cpp/Makefile.thrift
+++ b/test/cpp/Makefile.thrift
@@ -6,14 +6,15 @@
 # Default target is everything
 
 ifndef thrift_home
-thrift_home=../../build
+thrift_home=/usr/local
 endif #thrift_home
 
 target: all
 
 ifndef boost_home
 boost_home=../../../../../thirdparty/boost_1_33_1
-endif #thrift_home
+boost_home=/usr/local/include/boost-1_33_1
+endif #boost_home
 target: all
 
 include_paths = $(thrift_home)/include/thrift \
@@ -30,8 +31,8 @@
 LD     = g++
 
 # Compiler flags
-DCFL  = -Wall -O3 -g -I../cpp-gen $(include_flags) -L$(thrift_home)/lib -lthrift
-CFL   = -Wall -O3 -I../cpp-gen $(include_flags) -L$(thrift_home)/lib -lthrift
+DCFL  = -Wall -O3 -g -I./gen-cpp $(include_flags) -L$(thrift_home)/lib -lthrift
+CFL   = -Wall -O3 -I./gen-cpp $(include_flags) -L$(thrift_home)/lib -lthrift
 
 all: server client
 
@@ -41,16 +42,16 @@
 	$(THRIFT) --cpp ../ThriftTest.thrift
 
 server-debug: stubs
-	g++ -o TestServer $(DCFL) src/TestServer.cc ../cpp-gen/ThriftTest.cc
+	g++ -o TestServer $(DCFL) src/TestServer.cc ./gen-cpp/ThriftTest.cc
 
 client-debug: stubs
-	g++ -o TestClient $(DCFL) src/TestClient.cc ../cpp-gen/ThriftTest.cc
+	g++ -o TestClient $(DCFL) src/TestClient.cc ./gen-cpp/ThriftTest.cc
 
 server: stubs
-	g++ -o TestServer $(CFL) src/TestServer.cc ../cpp-gen/ThriftTest.cc
+	g++ -o TestServer $(CFL) src/TestServer.cc ./gen-cpp/ThriftTest.cc
 
 client: stubs
-	g++ -o TestClient $(CFL) src/TestClient.cc ../cpp-gen/ThriftTest.cc
+	g++ -o TestClient $(CFL) src/TestClient.cc ./gen-cpp/ThriftTest.cc
 
 clean:
 	rm -fr TestServer TestClient ../cpp-gen
diff --git a/test/cpp/src/TestClient.cc b/test/cpp/src/TestClient.cc
index 2e2f61b..d340e26 100644
--- a/test/cpp/src/TestClient.cc
+++ b/test/cpp/src/TestClient.cc
@@ -98,7 +98,7 @@
      */
     printf("testI64(-34359738368)");
     int64_t i64 = testClient.testI64(-34359738368LL);
-    printf(" = %lld\n", i64);
+    printf(" = %ld\n", i64);
     
     /**
      * STRUCT TEST
@@ -110,7 +110,7 @@
     out.i32_thing = -3;
     out.i64_thing = -5;
     Xtruct in = testClient.testStruct(out);
-    printf(" = {\"%s\", %d, %d, %lld}\n",
+    printf(" = {\"%s\", %d, %d, %ld}\n",
            in.string_thing.c_str(),
            (int)in.byte_thing,
            in.i32_thing,
@@ -126,7 +126,7 @@
     out2.i32_thing = 5;
     Xtruct2 in2 = testClient.testNest(out2);
     in = in2.struct_thing;
-    printf(" = {%d, {\"%s\", %d, %d, %lld}, %d}\n",
+    printf(" = {%d, {\"%s\", %d, %d, %ld}, %d}\n",
            in2.byte_thing,
            in.string_thing.c_str(),
            (int)in.byte_thing,
@@ -258,7 +258,7 @@
      */
     printf("testTypedef(309858235082523)");
     UserId uid = testClient.testTypedef(309858235082523LL);
-    printf(" = %lld\n", uid);
+    printf(" = %ld\n", uid);
 
     /**
      * NESTED MAP TEST
@@ -293,7 +293,7 @@
     printf(" = {");
     map<UserId, map<Numberz,Insanity> >::const_iterator i_iter;
     for (i_iter = whoa.begin(); i_iter != whoa.end(); ++i_iter) {
-      printf("%lld => {", i_iter->first);
+      printf("%ld => {", i_iter->first);
       map<Numberz,Insanity>::const_iterator i2_iter;
       for (i2_iter = i_iter->second.begin();
            i2_iter != i_iter->second.end();
@@ -303,7 +303,7 @@
         map<Numberz, UserId>::const_iterator um;
         printf("{");
         for (um = userMap.begin(); um != userMap.end(); ++um) {
-          printf("%d => %lld, ", um->first, um->second);
+          printf("%d => %ld, ", um->first, um->second);
         }
         printf("}, ");
 
@@ -311,7 +311,7 @@
         list<Xtruct>::const_iterator x;
         printf("{");
         for (x = xtructs.begin(); x != xtructs.end(); ++x) {
-          printf("{\"%s\", %d, %d, %lld}, ",
+          printf("{\"%s\", %d, %d, %ld}, ",
                  x->string_thing.c_str(),
                  (int)x->byte_thing,
                  x->i32_thing,
@@ -350,7 +350,7 @@
       printf("testClient.testMultiException(\"Xception\", \"test 1\") =>");
       Xtruct result = testClient.testMultiException("Xception", "test 1");
       printf("  result\nFAILURE\n");
-    }  catch(Xception& e) {
+    } catch(Xception& e) {
       printf("  {%u, \"%s\"}\n", e.errorCode, e.message.c_str());
     }
 
@@ -359,7 +359,7 @@
       Xtruct result = testClient.testMultiException("Xception2", "test 2");
       printf("  result\nFAILURE\n");
       
-    }  catch(Xception2& e) {
+    } catch(Xception2& e) {
       printf("  {%u, {\"%s\"}}\n", e.errorCode, e.struct_thing.string_thing.c_str());
     }
     
@@ -372,7 +372,7 @@
     }
     
     uint64_t stop = now();
-    printf("Total time: %llu us\n", stop-start);
+    printf("Total time: %lu us\n", stop-start);
     
     bufferedSocket->close();
   }
diff --git a/test/cpp/src/TestServer.cc b/test/cpp/src/TestServer.cc
index 9e5cf91..baf2ae5 100644
--- a/test/cpp/src/TestServer.cc
+++ b/test/cpp/src/TestServer.cc
@@ -33,7 +33,7 @@
     return thing;
   }
 
-  uint8_t testByte(uint8_t thing) {
+  int8_t testByte(int8_t thing) {
     printf("testByte(%d)\n", (int)thing);
     return thing;
   }
@@ -44,12 +44,12 @@
   }
 
   int64_t testI64(int64_t thing) {
-    printf("testI64(%lld)\n", thing);
+    printf("testI64(%ld)\n", thing);
     return thing;
   }
 
   Xtruct testStruct(Xtruct thing) {
-    printf("testStruct({\"%s\", %d, %d, %lld})\n",
+    printf("testStruct({\"%s\", %d, %d, %ld})\n",
            thing.string_thing.c_str(),
            (int)thing.byte_thing,
            thing.i32_thing,
@@ -59,7 +59,7 @@
 
   Xtruct2 testNest(Xtruct2 nest) {
     Xtruct thing = nest.struct_thing;
-    printf("testNest({%d, {\"%s\", %d, %d, %lld}, %d})\n",
+    printf("testNest({%d, {\"%s\", %d, %d, %ld}, %d})\n",
            (int)nest.byte_thing,
            thing.string_thing.c_str(),
            (int)thing.byte_thing,
@@ -123,7 +123,7 @@
   }
 
   UserId testTypedef(UserId thing) {
-    printf("testTypedef(%lld)\n", thing);
+    printf("testTypedef(%ld)\n", thing);
     return thing;
   }
 
@@ -183,7 +183,7 @@
     printf(" = {");
     map<UserId, map<Numberz,Insanity> >::const_iterator i_iter;
     for (i_iter = insane.begin(); i_iter != insane.end(); ++i_iter) {
-      printf("%lld => {", i_iter->first);
+      printf("%ld => {", i_iter->first);
       map<Numberz,Insanity>::const_iterator i2_iter;
       for (i2_iter = i_iter->second.begin();
            i2_iter != i_iter->second.end();
@@ -193,7 +193,7 @@
         map<Numberz, UserId>::const_iterator um;
         printf("{");
         for (um = userMap.begin(); um != userMap.end(); ++um) {
-          printf("%d => %lld, ", um->first, um->second);
+          printf("%d => %ld, ", um->first, um->second);
         }
         printf("}, ");
 
@@ -201,7 +201,7 @@
         list<Xtruct>::const_iterator x;
         printf("{");
         for (x = xtructs.begin(); x != xtructs.end(); ++x) {
-          printf("{\"%s\", %d, %d, %lld}, ",
+          printf("{\"%s\", %d, %d, %ld}, ",
                  x->string_thing.c_str(),
                  (int)x->byte_thing,
                  x->i32_thing,
@@ -218,7 +218,7 @@
     return insane;
   }
 
-  Xtruct testMulti(uint8_t arg0, int32_t arg1, uint64_t arg2, std::map<int16_t, std::string>  arg3, Numberz arg4, UserId arg5) {
+  Xtruct testMulti(int8_t arg0, int32_t arg1, int64_t arg2, std::map<int16_t, std::string>  arg3, Numberz arg4, UserId arg5) {
     printf("testMulti()\n");
     
     Xtruct hello;
@@ -230,9 +230,9 @@
     return hello;
   }
 
-  virtual void testException(std::string arg) throw(struct thrift::test::Xception) {
+  void testException(std::string arg) throw(Xception) {
     printf("testException(%s)\n", arg.c_str());
-    if(arg.compare("Xception") == 0) {
+    if (arg.compare("Xception") == 0) {
       Xception e;
       e.errorCode = 1001;
       e.message = "This is an Xception";
@@ -244,7 +244,7 @@
     }
   }
   
-  virtual struct Xtruct testMultiException(std::string arg0, std::string arg1) throw(struct Xception, struct Xception2) {
+  Xtruct testMultiException(std::string arg0, std::string arg1) throw(Xception, Xception2) {
 
     printf("testMultiException(%s, %s)\n", arg0.c_str(), arg1.c_str());
 
@@ -357,7 +357,7 @@
   // Transport
   shared_ptr<TServerSocket> serverSocket(new TServerSocket(port));
 
-  if(serverType == "simple") {
+  if (serverType == "simple") {
 
     // Server
     TSimpleServer simpleServer(testServer,
@@ -367,7 +367,7 @@
     printf("Starting the server on port %d...\n", port);
     simpleServer.run();
 
-  } else if(serverType == "thread-pool") {
+  } else if (serverType == "thread-pool") {
 
     shared_ptr<ThreadManager> threadManager = ThreadManager::newSimpleThreadManager(workerCount);
 
diff --git a/test/php/Makefile b/test/php/Makefile
index 2e6bec5..12fd7c8 100644
--- a/test/php/Makefile
+++ b/test/php/Makefile
@@ -9,19 +9,17 @@
 # Tools
 THRIFT = thrift
 
-# Compiler flags
-LIBS  = ../../lib/cpp/server/TSimpleServer.cc \
-	../../lib/cpp/protocol/TBinaryProtocol.cc \
-	../../lib/cpp/transport/TBufferedTransport.cc \
-	../../lib/cpp/transport/TServerSocket.cc \
-	../../lib/cpp/transport/TSocket.cc
-CFL   = -Wall -O3 -Igen-cpp -I../../lib/cpp $(LIBS)
-CFL   = -Wall -O3 -Igen-cpp -I../../lib/cpp -lthrift
+all: normal inline
 
-all: stubs
+normal: stubs
+
+inline: stubs-inline
 
 stubs: ../ThriftTest.thrift
-	$(THRIFT) -php ../ThriftTest.thrift
+	$(THRIFT) --php ../ThriftTest.thrift
+
+stubs-inline: ../ThriftTest.thrift
+	$(THRIFT) --phpi ../ThriftTest.thrift
 
 clean:
-	rm -fr gen-php
+	rm -fr gen-php gen-phpi
diff --git a/test/php/TestClient.php b/test/php/TestClient.php
index 8f765fa..6dd40d7 100644
--- a/test/php/TestClient.php
+++ b/test/php/TestClient.php
@@ -1,19 +1,26 @@
 <?php
 
+if (!isset($GEN_DIR)) {
+  $GEN_DIR = 'gen-php';
+}
+if (!isset($MODE)) {
+  $MODE = 'normal';
+}
+
 /** Include the Thrift base */
 require_once '/home/mcslee/code/projects/thrift/lib/php/src/Thrift.php';
 
 /** Include the binary protocol */
-require_once THRIFT_ROOT.'/protocol/TBinaryProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'].'/protocol/TBinaryProtocol.php';
 
 /** Include the socket layer */
-require_once THRIFT_ROOT.'/transport/TSocket.php';
+require_once $GLOBALS['THRIFT_ROOT'].'/transport/TSocket.php';
 
 /** Include the socket layer */
-require_once THRIFT_ROOT.'/transport/TBufferedTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'].'/transport/TBufferedTransport.php';
 
 /** Include the generated code */
-require_once '/home/mcslee/code/projects/thrift/test/php/gen-php/ThriftTest.php';
+require_once '/home/mcslee/code/projects/thrift/test/php/'.$GEN_DIR.'/ThriftTest.php';
 
 $host = 'localhost';
 $port = 9090;
@@ -27,11 +34,18 @@
 }
 
 $socket = new TSocket($host, $port);
-$bufferedSocket = new TBufferedTransport($socket, 1024, 1024);
-$binary = new TBinaryProtocol();
 
-$testClient = new ThriftTestClient($bufferedSocket, $binary);
-$bufferedSocket->open();
+if ($MODE == 'inline') {
+  $transport = $socket;
+  $testClient = new ThriftTestClient($transport);
+} else {
+  $bufferedSocket = new TBufferedTransport($socket, 1024, 1024);
+  $transport = $bufferedSocket;
+  $protocol = new TBinaryProtocol();
+  $testClient = new ThriftTestClient($transport, $protocol);
+}
+
+$transport->open();
 
 $start = microtime(true);
 
@@ -261,16 +275,20 @@
     print_r("$k2 => {");
     $userMap = $v2->userMap;
     print_r("{");
-    foreach ($userMap as $k3 => $v3) {
-      print_r("$k3 => $v3, ");
+    if (is_array($usermap)) {
+      foreach ($userMap as $k3 => $v3) {
+        print_r("$k3 => $v3, ");
+      }
     }
     print_r("}, ");
     
     $xtructs = $v2->xtructs;
     print_r("{");
-    foreach ($xtructs as $x) {
-      print_r("{\"".$x->string_thing."\", ".
-              $x->byte_thing.", ".$x->i32_thing.", ".$x->i64_thing."}, ");
+    if (is_array($xtructs)) {
+      foreach ($xtructs as $x) {
+        print_r("{\"".$x->string_thing."\", ".
+                $x->byte_thing.", ".$x->i32_thing.", ".$x->i64_thing."}, ");
+      }
     }
     print_r("}");
     
@@ -280,6 +298,17 @@
 }
 print_r("}\n");
 
+/**
+ * EXCEPTION TEST
+ */
+print_r("testException('Xception')");
+try {
+  $testClient->testException('Xception');
+  print_r("  void\nFAILURE\n");
+} catch (Xception $x) {
+  print_r(' caught xception '.$x->errorCode.': '.$x->message."\n");
+}
+
 
 /**
  * Normal tests done.
@@ -321,7 +350,7 @@
   print "Missed $num = $num2\n";
 }
 
-$bufferedSocket->close();
+$transport->close();
 return;
 
 ?>
diff --git a/test/php/TestInline.php b/test/php/TestInline.php
new file mode 100644
index 0000000..306ece6
--- /dev/null
+++ b/test/php/TestInline.php
@@ -0,0 +1,5 @@
+<?php
+$GEN_DIR = 'gen-phpi';
+$MODE = 'inline';
+include_once('TestClient.php');
+?>
