added makefile to build everything and fixed compile errors. Added .gitignore