fix php unit tests!
do limited bounds checking
Makefile cleanups