Some fixes, statics and comments

- fixed the negativ window position value
- changed the names of settings to static vars
- extracted some methodes
- added some comments