Clean the code and make it more clear

Do not be afraid of all the changes please, and if you not agree with certains ones, just tell me which one.
This is just the beginning. I will do more cleaning later.

Modifications :

- var is a useless keyword in a lot of case. Put the right keyword allows us to understand faster what the variable is   meant to be.
- A lot of useless braces and newlines are removed.
- Some condition are changed too.
- Identation improved.