Added .gitignore and fixed collision code to be more clear