fixed compile errors and added a .gitignore