add makefile and minor changes