fix a few more bugs detected by the simple tester.
-rw-r--r-- 109 .gitignore
drwxr-xr-x - Documentation
-rw-r--r-- 112 Makefile
drwxr-xr-x - kernel
drwxr-xr-x - lib
drwxr-xr-x - test