added debug mode
debug mode was a bad idea, but the Makefile and type-checking were good ideas