Fix syntax errors and add .gitignore