fixed CyclomaticComplexity and RedundantSelf offences