Fix CS violations and scrutinizer feedback