"Compiling" version
diff --git a/Modules/cgen.py b/Modules/cgen.py
index 0cdeaa6..1e345d1 100644
--- a/Modules/cgen.py
+++ b/Modules/cgen.py
@@ -33,8 +33,8 @@
 #
 def getnum(s):
 	n = ''
-	while s[:1] in digits:
-		n = n + s[:1]
+	while s and s[0] in digits:
+		n = n + s[0]
 		s = s[1:]
 	return n, s
 
diff --git a/Modules/cstubs b/Modules/cstubs
index f0f5ade..88a77bc 100644
--- a/Modules/cstubs
+++ b/Modules/cstubs
@@ -25,24 +25,13 @@
 		N*retval
 */
 
-#include <stdio.h>
 #include <gl.h>
 #include <device.h>
-#include "PROTO.h"
-#include "object.h"
-#include "intobject.h"
-#include "floatobject.h"
-#include "listobject.h"
-#include "tupleobject.h"
-#include "dictobject.h"
-#include "methodobject.h"
-#include "moduleobject.h"
-#include "objimpl.h"
+
+#include "allobjects.h"
 #include "import.h"
-#include "sigtype.h"
 #include "modsupport.h"
 #include "cgensupport.h"
-#include "errors.h"
 
 /*
 Some stubs are too complicated for the stub generator.
diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c
index 218658f..e811088 100644
--- a/Modules/mathmodule.c
+++ b/Modules/mathmodule.c
@@ -1,20 +1,11 @@
 /* Math module -- standard C math library functions, pi and e */
 
-#include <stdio.h>
-#include <math.h>
+#include "allobjects.h"
 
-#include "PROTO.h"
-#include "object.h"
-#include "intobject.h"
-#include "tupleobject.h"
-#include "floatobject.h"
-#include "dictobject.h"
-#include "methodobject.h"
-#include "moduleobject.h"
-#include "objimpl.h"
-#include "import.h"
 #include "modsupport.h"
 
+#include <math.h>
+
 static int
 getdoublearg(args, px)
 	register object *args;
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index c2166dc..ea0ac6c 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -1,6 +1,5 @@
 /* POSIX module implementation */
 
-#include <stdio.h>
 #include <signal.h>
 #include <string.h>
 #include <setjmp.h>
@@ -14,20 +13,8 @@
 #include <sys/dir.h>
 #endif
 
-#include "PROTO.h"
-#include "object.h"
-#include "intobject.h"
-#include "stringobject.h"
-#include "tupleobject.h"
-#include "listobject.h"
-#include "dictobject.h"
-#include "methodobject.h"
-#include "moduleobject.h"
-#include "objimpl.h"
-#include "import.h"
-#include "sigtype.h"
+#include "allobjects.h"
 #include "modsupport.h"
-#include "errors.h"
 
 extern char *strerror PROTO((int));
 
@@ -140,7 +127,6 @@
 	v = newtupleobject(10);
 	if (v == NULL)
 		return NULL;
-	errno = 0;
 #define SET(i, st_member) settupleitem(v, i, newintobject((long)st.st_member))
 	SET(0, st_mode);
 	SET(1, st_ino);
@@ -153,9 +139,9 @@
 	SET(8, st_mtime);
 	SET(9, st_ctime);
 #undef SET
-	if (errno != 0) {
+	if (err_occurred()) {
 		DECREF(v);
-		return err_nomem();
+		return NULL;
 	}
 	return v;
 }
@@ -335,6 +321,8 @@
 
 #ifdef NO_GETCWD
 
+#include "errno.h"
+
 /* Quick hack to get posix.getcwd() working for pure BSD 4.3 */
 /* XXX This assumes MAXPATHLEN = 1024 !!! */
 
diff --git a/Modules/stdwinmodule.c b/Modules/stdwinmodule.c
index cae07cf..da511ec 100644
--- a/Modules/stdwinmodule.c
+++ b/Modules/stdwinmodule.c
@@ -38,22 +38,11 @@
    XXX more?
 */
 
-#include <stdio.h>
-#include "stdwin.h"
+#include "allobjects.h"
 
-#include "PROTO.h"
-#include "object.h"
-#include "intobject.h"
-#include "stringobject.h"
-#include "tupleobject.h"
-#include "dictobject.h"
-#include "methodobject.h"
-#include "moduleobject.h"
-#include "objimpl.h"
-#include "import.h"
 #include "modsupport.h"
-#include "errors.h"
 
+#include "stdwin.h"
 
 /* Window and menu object types declared here because of forward references */
 
diff --git a/Modules/timemodule.c b/Modules/timemodule.c
index 334b2d3..28d4ff7 100644
--- a/Modules/timemodule.c
+++ b/Modules/timemodule.c
@@ -1,6 +1,11 @@
 /* Time module */
 
-#include <stdio.h>
+#include "allobjects.h"
+
+#include "modsupport.h"
+
+#include "sigtype.h"
+
 #include <signal.h>
 #include <setjmp.h>
 
@@ -11,18 +16,6 @@
 extern time_t time();
 #endif /* !__STDC__ */
 
-#include "PROTO.h"
-#include "object.h"
-#include "intobject.h"
-#include "dictobject.h"
-#include "methodobject.h"
-#include "moduleobject.h"
-#include "objimpl.h"
-#include "import.h"
-#include "sigtype.h"
-#include "modsupport.h"
-#include "errors.h"
-
 
 /* Time methods */