Fix pointer handling bug
Add .gitignore