Code convention & performance

Fixing a bunch of code convention to improve readability.
Replacing equality sign with identity where possible to improve
performance.