Makefile and compile warning fixes