Refactor according to scrutinizer.