[Utils] Clean up/Fix things found by Cppcheck

f71bd32b0841355189688a28af0647fdbd678201 and 
4ff1085e1637e3afc5c583bf37645f0cf4ac4513 are the most important one imo.