install makefile and minor fixes