Fixes pre code insertion and adds .gitignore