added makefile and several changes