Cleaning code base

Few commits to make the code base better.

If you have any question about this or if something looks wrong, just let me know.

Regards,