Add .gitignore
General cleanup of code, fix gnotice threading