add a makefile and clean up some warnings