Cleaning of code by fixing warnings