Some cleaning and getting rid of warnings