made Makefile and fixed compilation errors
added remove function