Add configure script, remove makefile, fix warnings