Minor code cleanup and updated .gitignore