Added makefile and fixed minor compile warnings