Fix code climate warnings