Updated .gitignore for Netbeans specific things
General tidyup of source
Some stuff that Netbeans changed by itself

I have no idea whether these changes (or even files) are important. But
I can't be bothered to google it, so I shall err on the side of caution.