Improved makefile
makefile fixes
more makefile work; invalid output problems still