Updated gitignore, and documented function