Minor fixes and improvements in Makefile