test.py fixes and makefile