Minor tweaks in running functions
Some clean up, added debug flag to makefile