Fixing code climate warnings