Nitpicking the code

Minor changes here and there to remove warnings and make code cleaner and more uniform.
Thanks for doing this, another case of premature optimization at its worst.