Code cleanup from Scrutinizer CI suggestions