Rewriting makefile

Rewrote Makefile and added .gitignore.