Multiples optimizations according to Lint

First part of the optimizations list by Lint