rename i to left, rewrite function p to remove undefined behavior
rename debug to log
replace NDEBUG with LOG
make multiple variables to show inefficient with call-by-name
improve display of loaded program