Refactor the files and Added Makefile