Fixes compilation warnings and code indentation