Modified Makefile and fixed errors