Fixed countless warnings
Divers small changes