Minor changes to Makefile and code