Huge Pull Request with several fixes and improvements

Well, this pull request is kinda huge since contains all my old commits (which I had to redo for a third because of conflicts :( ). But atleast they are now without reformatting only final modifiers where added for local variable and parameters so you can skip these lines while reviewing.