Enhanced .gitignore

Changes mainly for netbeans and intellij. Plus some small cleanups.