diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/REngine.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/REngine.java
index 283b32fc899b0684a18c908a201752c1837ec14d..9ea740469f754190b491e7250c80116e363ab2b4 100644
--- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/REngine.java
+++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/REngine.java
@@ -209,15 +209,6 @@ final class REngine implements Engine, Engine.Timings {
         }
     }
 
-    public void initializeRNG() {
-        assert REnvironment.globalEnv() != null;
-        RFunction fun = context.lookupBuiltin(".fastr.set.seed");
-        ActiveBinding dotRandomSeed = new ActiveBinding(RType.Any, fun, true);
-        Frame frame = REnvironment.globalEnv().getFrame();
-        FrameSlot slot = FrameSlotChangeMonitor.findOrAddFrameSlot(frame.getFrameDescriptor(), RRNG.RANDOM_SEED, FrameSlotKind.Object);
-        FrameSlotChangeMonitor.setActiveBinding(frame, slot, dotRandomSeed, false, null);
-    }
-
     @Override
     public void checkAndRunStartupShutdownFunction(String name, String... args) {
         Object func = REnvironment.globalEnv().findFunction(name);
diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/RRuntimeASTAccessImpl.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/RRuntimeASTAccessImpl.java
index 66ac4a2b31008d02fbada8b5df6e89449e20967c..1e8fa828c18417547e78c25d7639c52e43615738 100644
--- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/RRuntimeASTAccessImpl.java
+++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/RRuntimeASTAccessImpl.java
@@ -686,7 +686,6 @@ class RRuntimeASTAccessImpl implements RRuntimeASTAccess {
                 arg = null;
             } else if (arg.startsWith(">")) {
                 assert !intern;
-                arg = null;
                 throw RError.nyi(RError.NO_CALLER, "stdout redirect");
             }
             if (arg != null) {
diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/shell/REmbedded.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/shell/REmbedded.java
index 952f2069c81fd667fd8b41463adab8bbb2e737b2..0815c3bc096f70e9ff132d20aa073ea15387b16b 100644
--- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/shell/REmbedded.java
+++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/shell/REmbedded.java
@@ -118,6 +118,8 @@ public class REmbedded {
      */
     private static final Source INIT = Source.newBuilder("R", "1", "<embedded>").buildLiteral();
 
+    // TODO: to be invoked from native
+    @SuppressWarnings("unused")
     private static void endRmainloop(int status) {
         context.leave();
         context.close();
diff --git a/com.oracle.truffle.r.launcher/src/com/oracle/truffle/r/launcher/RCmdOptions.java b/com.oracle.truffle.r.launcher/src/com/oracle/truffle/r/launcher/RCmdOptions.java
index d21b3d68e3ea54a4145ccc80390df845b07ed980..54f4d5fa3367d07ad73599aae93d2a5d6e9c9620 100644
--- a/com.oracle.truffle.r.launcher/src/com/oracle/truffle/r/launcher/RCmdOptions.java
+++ b/com.oracle.truffle.r.launcher/src/com/oracle/truffle/r/launcher/RCmdOptions.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -337,14 +337,6 @@ public final class RCmdOptions {
         this.arguments = arguments;
     }
 
-    void printHelpAndVersion() {
-        if (getBoolean(HELP)) {
-            throw printHelpAndExit(RCmdOptions.Client.R);
-        } else if (getBoolean(VERSION)) {
-            throw printVersionAndExit();
-        }
-    }
-
     static void printHelp(Client client) {
         System.out.println(client.usage());
         System.out.println("Options:");
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/GridColorUtils.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/GridColorUtils.java
index 9f4f4f046cdba9866aae16f20f5194a2c66d0fa2..77cd59a19da1778978cc5499701e667e8b651d98 100644
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/GridColorUtils.java
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/GridColorUtils.java
@@ -5,7 +5,7 @@
  *
  * Copyright (c) 1997-2014, The R Core Team
  * Copyright (c) 2003, The R Foundation
- * Copyright (c) 2017, Oracle and/or its affiliates
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates
  *
  * All rights reserved.
  */
@@ -83,24 +83,6 @@ public final class GridColorUtils {
         return result;
     }
 
-    public static String gridColorToRString(GridColor color) {
-        boolean isOpaque = color.getAlpha() == GridColor.OPAQUE_ALPHA;
-        int size = isOpaque ? 7 : 9;
-        char[] value = new char[size];
-        value[0] = '#';
-        value[1] = getHexDigit(color.getRed() >> 4);
-        value[2] = getHexDigit(color.getRed());
-        value[3] = getHexDigit(color.getGreen() >> 4);
-        value[4] = getHexDigit(color.getGreen());
-        value[5] = getHexDigit(color.getBlue() >> 4);
-        value[6] = getHexDigit(color.getBlue());
-        if (!isOpaque) {
-            value[7] = getHexDigit((color.getAlpha()) >> 4);
-            value[8] = getHexDigit(color.getAlpha());
-        }
-        return new String(value);
-    }
-
     public static GridColor parseHex(String value) {
         // hex format, e.g. #ffffff
         int red = Integer.parseInt(value.substring(1, 3), 16);
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/GridState.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/GridState.java
index 77f8e4293eab0192390b1f6552f99e863b47a582..df31021b88c0c8d91362272f12ae52a61a73197f 100644
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/GridState.java
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/GridState.java
@@ -5,7 +5,7 @@
  *
  * Copyright (C) 2001-3 Paul Murrell
  * Copyright (c) 1998-2013, The R Core Team
- * Copyright (c) 2017, Oracle and/or its affiliates
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates
  *
  * All rights reserved.
  */
@@ -179,15 +179,6 @@ public final class GridState {
                 colors[i] = GridColorUtils.gridColorFromString(colorNames[i]);
             }
         }
-
-        public GridPalette(int[] colors) {
-            this.colors = new GridColor[colors.length];
-            colorNames = new String[colors.length];
-            for (int i = 0; i < colors.length; i++) {
-                this.colors[i] = GridColor.fromRawValue(colors[i]);
-                colorNames[i] = GridColorUtils.gridColorToRString(this.colors[i]);
-            }
-        }
     }
 
     static final class GridDeviceState {
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/LPoints.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/LPoints.java
index 9cb924d7feebfae7785c34cfac36b18726902bff..5fd36b0f880b65007f4ddab73dd5993f78323925 100644
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/LPoints.java
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/LPoints.java
@@ -5,7 +5,7 @@
  *
  * Copyright (C) 2001-3 Paul Murrell
  * Copyright (c) 1998-2015, The R Core Team
- * Copyright (c) 2017, Oracle and/or its affiliates
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates
  *
  * All rights reserved.
  */
@@ -62,7 +62,6 @@ public abstract class LPoints extends RExternalBuiltinNode.Arg4 {
         RList currentVP = ctx.getGridState().getViewPort();
         RList gparList = ctx.getGridState().getGpar();
         GPar gpar = GPar.create(gparList);
-        double cex = GPar.getCex(gparList);
         ViewPortTransform vpTransform = ViewPortTransform.get(currentVP, dev);
         ViewPortContext vpContext = ViewPortContext.fromViewPort(currentVP);
         UnitConversionContext conversionCtx = new UnitConversionContext(vpTransform.size, vpContext, dev, gpar);
@@ -75,13 +74,13 @@ public abstract class LPoints extends RExternalBuiltinNode.Arg4 {
             double size = Unit.convertWidth(sizeVec, i, conversionCtx);
             if (loc.isFinite() && Double.isFinite(size)) {
                 contextCache = contextCache.from(gpar.getDrawingContext(i));
-                drawSymbol(contextCache, dev, cex, pchVec.getDataAt(i % pchVec.getLength()), size * SIZE_FACTOR, loc.x, loc.y);
+                drawSymbol(contextCache, dev, pchVec.getDataAt(i % pchVec.getLength()), size * SIZE_FACTOR, loc.x, loc.y);
             }
         }
         return RNull.instance;
     }
 
-    private static void drawSymbol(ContextCache ctxCache, GridDevice dev, double cex, int pch, double halfSize, double x, double y) {
+    private static void drawSymbol(ContextCache ctxCache, GridDevice dev, int pch, double halfSize, double x, double y) {
         // pch 0 - 25 are interpreted as geometrical shapes, pch from ascii code of ' ' are
         // interpreted as corresponding ascii character, which should be drawn
         // the coordinates should be interpreted as the center of the symbol
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/color/RGB.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/color/RGB.java
index e599a553cd1281d538dc5415285827afc3e25835..6cc23c226a396e2fb1db655a32f9065dec28bc82 100644
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/color/RGB.java
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/color/RGB.java
@@ -5,7 +5,7 @@
  *
  * Copyright (c) 1997-2014, The R Core Team
  * Copyright (c) 2003, The R Foundation
- * Copyright (c) 2017, Oracle and/or its affiliates
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates
  *
  * All rights reserved.
  */
@@ -85,17 +85,6 @@ public abstract class RGB extends RExternalBuiltinNode.Arg6 {
     @TypeSystemReference(RTypes.class)
     abstract static class RGBBase extends RBaseNode {
 
-        protected static int addColor(boolean alpha, int[] result, int start, GridColor color) {
-            int pos = start;
-            result[pos++] = color.getRed();
-            result[pos++] = color.getGreen();
-            result[pos++] = color.getBlue();
-            if (alpha) {
-                result[pos++] = color.getAlpha();
-            }
-            return pos;
-        }
-
         private static final char[] HexDigits = "0123456789ABCDEF".toCharArray();
 
         protected static String rgb2rgb(int r, int g, int b) {
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/device/DrawingContext.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/device/DrawingContext.java
index dcfb747b4f7be4595bc795e2b31b08c1fd74d353..a285fb0a2adacf58fc8b1ffb23f4532d57b1bef1 100644
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/device/DrawingContext.java
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/device/DrawingContext.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -149,18 +149,4 @@ public interface DrawingContext {
      * The fill color of shapes.
      */
     GridColor getFillColor();
-
-    static boolean areSame(DrawingContext ctx1, DrawingContext ctx2) {
-        return ctx1 == ctx2 || (ctx1.getColor().equals(ctx2.getColor()) &&
-                        ctx1.getLineEnd() == ctx2.getLineEnd() &&
-                        ctx1.getLineJoin() == ctx2.getLineJoin() &&
-                        ctx1.getLineType() == ctx2.getLineType() &&
-                        ctx1.getLineHeight() == ctx2.getLineHeight() &&
-                        ctx1.getFontStyle() == ctx2.getFontStyle() &&
-                        ctx1.getFontSize() == ctx2.getFontSize() &&
-                        ctx1.getFontFamily().equals(ctx2.getFontFamily()) &&
-                        ctx1.getLineWidth() == ctx2.getLineWidth() &&
-                        ctx1.getLineMitre() == ctx2.getLineMitre() &&
-                        ctx1.getFillColor().equals(ctx2.getFillColor()));
-    }
 }
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/methods/MethodsListDispatch.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/methods/MethodsListDispatch.java
index b425dc3efb5030064dd0fcb3c46d840dc6995e93..9929505c651dc9307cb131d3a285cf260bedab25 100644
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/methods/MethodsListDispatch.java
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/methods/MethodsListDispatch.java
@@ -366,7 +366,6 @@ public class MethodsListDispatch {
 
         @Child private CastToVectorNode castToVector = CastToVectorNodeGen.create(false);
         @Child private ClassHierarchyScalarNode classHierarchyNode = ClassHierarchyScalarNodeGen.create();
-        @Child private PromiseHelperNode promiseHelper;
         @Child private GetFixedAttributeNode getGenericAttrNode = GetFixedAttributeNode.create(RRuntime.GENERIC_ATTR_KEY);
         @Child private GetFixedAttributeNode getPckgAttrNode = GetFixedAttributeNode.create(RRuntime.PCKG_ATTR_KEY);
 
@@ -446,7 +445,6 @@ public class MethodsListDispatch {
     public abstract static class R_nextMethodCall extends RExternalBuiltinNode.Arg2 {
 
         @Child private LocalReadVariableNode readDotNextMethod;
-        @Child private LocalReadVariableNode readDots;
 
         static {
             Casts.noCasts(R_nextMethodCall.class);
@@ -459,7 +457,7 @@ public class MethodsListDispatch {
             // leading to a problem if contains a different frame; should we finesse implementation
             // of LocalReadVariableNode to handle this?
             readDotNextMethod = insert(LocalReadVariableNode.create(RRuntime.R_DOT_NEXT_METHOD, false));
-            readDots = insert(LocalReadVariableNode.create("...", false));
+            // TODO: do we need to handle "..." here? Read it and forward it?
 
             RFunction op = (RFunction) readDotNextMethod.execute(null, ev.getFrame());
             if (op == null) {
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/methods/Slot.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/methods/Slot.java
index d10cc835fe4c0ea44db03668f21c2e40e4992d8f..8b72febafa31dc086f46cc1a784ecf097f44e3bb 100644
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/methods/Slot.java
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/methods/Slot.java
@@ -5,7 +5,7 @@
  *
  * Copyright (c) 1995-2013, The R Core Team
  * Copyright (c) 2003, The R Foundation
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates
  *
  * All rights reserved.
  */
@@ -91,7 +91,6 @@ public class Slot {
     public abstract static class R_hasSlot extends RExternalBuiltinNode.Arg2 {
 
         @Child private HasSlotNode hasSlotNode;
-        @Child private CastToAttributableNode castAttributable = CastToAttributableNodeGen.create(true, true, true);
 
         static {
             Casts casts = new Casts(R_hasSlot.class);
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/RMultinomNode.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/RMultinomNode.java
index 0fcd70396e68153561ab018f2ac36a6f3b5083e1..664cedeb1b3be4f5e35c4c2f9a39222c092f17b4 100644
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/RMultinomNode.java
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/RMultinomNode.java
@@ -6,7 +6,7 @@
  * Copyright (c) 1995, 1996  Robert Gentleman and Ross Ihaka
  * Copyright (c) 1997-2012, The R Core Team
  * Copyright (c) 2003-2008, The R Foundation
- * Copyright (c) 2016, 2017, Oracle and/or its affiliates
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates
  *
  * All rights reserved.
  */
@@ -37,7 +37,6 @@ import com.oracle.truffle.r.runtime.data.model.RAbstractDoubleVector;
 import com.oracle.truffle.r.runtime.data.nodes.VectorAccess;
 import com.oracle.truffle.r.runtime.data.nodes.VectorAccess.SequentialIterator;
 import com.oracle.truffle.r.runtime.nmath.RandomFunctions.RandomNumberProvider;
-import com.oracle.truffle.r.runtime.nmath.distr.RMultinom;
 import com.oracle.truffle.r.runtime.nmath.distr.Rbinom;
 import com.oracle.truffle.r.runtime.nodes.RBaseNode;
 import com.oracle.truffle.r.runtime.rng.RRNG;
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/AccessArgumentNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/AccessArgumentNode.java
index edba93cf227be044180e76fbb148bbc26b1ff9d8..1010da72fc1e83aaf3baa3dff5bacc0eb630d277 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/AccessArgumentNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/AccessArgumentNode.java
@@ -57,8 +57,6 @@ import com.oracle.truffle.r.runtime.nodes.RSyntaxLookup;
  */
 public final class AccessArgumentNode extends RNode {
 
-    @Child private PromiseHelperNode promiseHelper;
-
     /**
      * The formal index of this argument.
      */
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/WriteLocalFrameVariableNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/WriteLocalFrameVariableNode.java
index 19b3ab595db32b7160421cf956bfb64aa4e501c5..912472329f3685f83155c9179ca1e237c03d61f8 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/WriteLocalFrameVariableNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/WriteLocalFrameVariableNode.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -49,10 +49,6 @@ public abstract class WriteLocalFrameVariableNode extends BaseWriteVariableNode
         return WriteLocalFrameVariableNodeGen.create(name, mode, rhs);
     }
 
-    public static WriteLocalFrameVariableNode createForRefCount(String name) {
-        return WriteLocalFrameVariableNodeGen.create(name, Mode.INVISIBLE, null);
-    }
-
     private final Mode mode;
 
     private final ValueProfile storedObjectProfile = ValueProfile.createClassProfile();
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/PositionCheckNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/PositionCheckNode.java
index bcd27aa7d7134782db82d91803ae2e21858a7d7e..3c4af86bd295b172d3a136aa00d3805762b258f8 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/PositionCheckNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/PositionCheckNode.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -58,7 +58,6 @@ abstract class PositionCheckNode extends RBaseNode {
     protected final boolean replace;
     protected final RType containerType;
     @Child private PositionCastNode castNode;
-    @Child private RLengthNode positionLengthNode = RLengthNode.create();
     @Child private PositionCharacterLookupNode characterLookup;
 
     private final ElementAccessMode mode;
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/CopyAttributesNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/CopyAttributesNode.java
index aad0f72b6b7ef6e2ea83e31af1300e2d506c1518..16a11fcb3e3e83ebb690d65d0cf9602780d8e909 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/CopyAttributesNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/CopyAttributesNode.java
@@ -33,7 +33,6 @@ import com.oracle.truffle.r.nodes.attributes.SpecialAttributesFunctions.GetDimAt
 import com.oracle.truffle.r.nodes.attributes.SpecialAttributesFunctions.GetDimNamesAttributeNode;
 import com.oracle.truffle.r.nodes.attributes.SpecialAttributesFunctions.GetNamesAttributeNode;
 import com.oracle.truffle.r.nodes.attributes.SpecialAttributesFunctions.SetDimNamesAttributeNode;
-import com.oracle.truffle.r.runtime.RRuntime;
 import com.oracle.truffle.r.runtime.data.RDataFactory;
 import com.oracle.truffle.r.runtime.data.RList;
 import com.oracle.truffle.r.runtime.data.RStringVector;
@@ -187,7 +186,6 @@ public abstract class CopyAttributesNode extends RBaseNode {
             if (hasDimNames.profile(newDimNames != null)) {
                 putDimNames.execute(result.getAttributes(), newDimNames);
 
-                newDimNames.elementNamePrefix = RRuntime.DIMNAMES_LIST_ELEMENT_NAME_PREFIX;
                 return result;
             }
             if (result != right) {
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/GetFixedAttributeNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/GetFixedAttributeNode.java
index ede99fc59e6c04242140dfac4cb00b91f2b4d203..6202383b3b5e3cd90396ba10fceec028d7251f47 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/GetFixedAttributeNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/GetFixedAttributeNode.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -78,7 +78,7 @@ public abstract class GetFixedAttributeNode extends FixedAttributeAccessNode {
         return shape.hasProperty(name);
     }
 
-    @Specialization(limit = "3", //
+    @Specialization(limit = "CACHE_LIMIT", //
                     guards = {"shapeCheck(shape, attrs)"}, //
                     assumptions = {"shape.getValidAssumption()"})
     protected Object getAttrCached(DynamicObject attrs,
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/RemoveFixedAttributeNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/RemoveFixedAttributeNode.java
index ec325f05c17df743aa366a9d268333e51837bb56..5dac5faadb7c765ebc3fafc8bdbd75c34104dee2 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/RemoveFixedAttributeNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/RemoveFixedAttributeNode.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -73,7 +73,7 @@ public abstract class RemoveFixedAttributeNode extends FixedAttributeAccessNode
 
     public abstract void execute(Object attrs);
 
-    @Specialization(limit = "3", //
+    @Specialization(limit = "CACHE_LIMIT", //
                     guards = {"shapeCheck(shape, attrs)", "location == null"}, //
                     assumptions = {"shape.getValidAssumption()"})
     protected void removeNonExistantAttr(@SuppressWarnings("unused") DynamicObject attrs,
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/SetFixedAttributeNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/SetFixedAttributeNode.java
index 0f46af182b3804468f8ca68e4d273568911a2fb8..14bd617b1b75f74da392ed22cf4cf50f1c1469ca 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/SetFixedAttributeNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/SetFixedAttributeNode.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -53,7 +53,6 @@ import com.oracle.truffle.r.runtime.data.RAttributeStorage;
 public abstract class SetFixedAttributeNode extends FixedAttributeAccessNode {
 
     @Child private SetFixedAttributeNode recursive;
-    @Child private SetSpecialAttributeNode setSpecialAttrNode;
 
     protected SetFixedAttributeNode(String name) {
         super(name);
@@ -85,7 +84,7 @@ public abstract class SetFixedAttributeNode extends FixedAttributeAccessNode {
 
     public abstract void execute(Object attr, Object value);
 
-    @Specialization(limit = "3", //
+    @Specialization(limit = "CACHE_LIMIT", //
                     guards = {"shapeCheck(shape, attrs)", "location != null", "canSet(location, value)"}, //
                     assumptions = {"shape.getValidAssumption()"})
     protected void setAttrCached(DynamicObject attrs, Object value,
@@ -98,7 +97,7 @@ public abstract class SetFixedAttributeNode extends FixedAttributeAccessNode {
         }
     }
 
-    @Specialization(limit = "3", //
+    @Specialization(limit = "CACHE_LIMIT", //
                     guards = {"shapeCheck(oldShape, attrs)", "oldLocation == null", "canStore(newLocation, value)"}, //
                     assumptions = {"oldShape.getValidAssumption()", "newShape.getValidAssumption()"})
     protected static void setNewAttrCached(DynamicObject attrs, Object value,
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/SpecialAttributesFunctions.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/SpecialAttributesFunctions.java
index bbf2c3212f896341f230fc57e5380797c2c54d57..c912a44eec2ccaefed18d5abbbeb099ed57300ee 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/SpecialAttributesFunctions.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/SpecialAttributesFunctions.java
@@ -345,7 +345,6 @@ public final class SpecialAttributesFunctions {
                 // for one dimensional array, "names" is really "dimnames[[1]]" (see R
                 // documentation for "names" function)
                 RList newDimNames = RDataFactory.createList(new Object[]{newNames});
-                newDimNames.elementNamePrefix = RRuntime.DIMNAMES_LIST_ELEMENT_NAME_PREFIX;
                 setDimNamesNode.setDimNames(xProfiled, newDimNames);
             } else {
                 assert newNames != xProfiled;
@@ -836,7 +835,6 @@ public final class SpecialAttributesFunctions {
                     resDimNames.updateDataAt(i, RNull.instance, null);
                 }
             }
-            resDimNames.elementNamePrefix = RRuntime.DIMNAMES_LIST_ELEMENT_NAME_PREFIX;
 
             if (x.getAttributes() == null) {
                 attrNullProfile.enter();
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/UnaryCopyAttributesNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/UnaryCopyAttributesNode.java
index 7d3c0b125a4507dbb285911c9df407c4ab6b9158..87dd0112d0360d32a809e85e6d62449e7a32fcc1 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/UnaryCopyAttributesNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/UnaryCopyAttributesNode.java
@@ -32,7 +32,6 @@ import com.oracle.truffle.r.nodes.attributes.SpecialAttributesFunctions.GetDimNa
 import com.oracle.truffle.r.nodes.attributes.SpecialAttributesFunctions.GetNamesAttributeNode;
 import com.oracle.truffle.r.nodes.function.opt.ShareObjectNode;
 import com.oracle.truffle.r.nodes.function.opt.UpdateShareableChildValueNode;
-import com.oracle.truffle.r.runtime.RRuntime;
 import com.oracle.truffle.r.runtime.data.RDataFactory;
 import com.oracle.truffle.r.runtime.data.RList;
 import com.oracle.truffle.r.runtime.data.RStringVector;
@@ -128,7 +127,6 @@ public abstract class UnaryCopyAttributesNode extends RBaseNode {
         if (hasDimNames.profile(newDimNames != null)) {
             updateRefCountNode.execute(updateChildRefCountNode.updateState(source, newDimNames));
             putDimNames.execute(result.getAttributes(), newDimNames);
-            newDimNames.elementNamePrefix = RRuntime.DIMNAMES_LIST_ELEMENT_NAME_PREFIX;
             return result;
         }
         return result;
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/RBuiltinNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/RBuiltinNode.java
index 11315ae9979fbad45ae0f72a77a21b590fadbe42..9d8c8f61bdf3f63b80e7c6f22c670c3a7bf3b9e5 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/RBuiltinNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/RBuiltinNode.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -132,7 +132,7 @@ public abstract class RBuiltinNode extends RBuiltinBaseNode implements NodeWithA
         Class<?> clazz = argumentClasses[index];
         if (clazz == null) {
             CompilerDirectives.transferToInterpreterAndInvalidate();
-            argumentClasses[index] = clazz = value.getClass();
+            argumentClasses[index] = value.getClass();
             return value;
         } else if (clazz == Object.class) {
             return value;
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/ExecutionPathVisitor.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/ExecutionPathVisitor.java
index a5b1b9b4a4701a404d06f1b97081fc4c14a7a87a..ac6bebbd256fa7b296d7fd7d66a92bceb7247198 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/ExecutionPathVisitor.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/ExecutionPathVisitor.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -62,7 +62,7 @@ public abstract class ExecutionPathVisitor<T> implements PipelineStepVisitor<T>
 
     @Override
     public final T visit(MapIfStep<?, ?> step, T previous) {
-        boolean visitTrueBranch = bs == null ? false : bs.get(mapIfStepStatuses.get(step));
+        boolean visitTrueBranch;
         if (bs == null) {
             visitTrueBranch = false;
             mapIfStepStatuses.put(step, mapIfCounter++);
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/control/BlockNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/control/BlockNode.java
index 3feff83c7a6b2e77446cb91bc971fb81512d627a..184b48c6d55ccb37ef6ff74f73136536f303f428 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/control/BlockNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/control/BlockNode.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -39,8 +39,6 @@ import com.oracle.truffle.r.runtime.nodes.RSyntaxNode;
  */
 public final class BlockNode extends OperatorNode {
 
-    public static final RNode[] EMPTY_BLOCK = new RNode[0];
-
     @Children protected final RNode[] sequence;
     @Child private SetVisibilityNode visibility;
 
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/FunctionDefinitionNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/FunctionDefinitionNode.java
index 0e4dded0da1df1d13a14317bc1d397cd81df695d..ce7183dbc7947c5153657234906ea74a71055fe7 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/FunctionDefinitionNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/FunctionDefinitionNode.java
@@ -141,8 +141,6 @@ public final class FunctionDefinitionNode extends RRootNode implements RSyntaxNo
      */
     private final ConditionProfile returnTopLevelProfile = ConditionProfile.createBinaryProfile();
 
-    @CompilationFinal private IdentityHashMap<RNode, Closure> languageClosureCache;
-
     public static FunctionDefinitionNode create(TruffleRLanguage language, SourceSection src, FrameDescriptor frameDesc, SourceSection[] argSourceSections, SaveArgumentsNode saveArguments,
                     RSyntaxNode body,
                     FormalArguments formals, String name, PostProcessArgumentsNode argPostProcess) {
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/FunctionExpressionNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/FunctionExpressionNode.java
index 89977152e716fd5635345a5f2c46ad1ea0a5fce1..b42898c63e0cb8070e1c27b4dc41ae07c29cae56 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/FunctionExpressionNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/FunctionExpressionNode.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -54,7 +54,6 @@ public final class FunctionExpressionNode extends RSourceSectionNode implements
 
     @CompilationFinal private RootCallTarget callTarget;
     private final PromiseDeoptimizeFrameNode deoptFrameNode;
-    @CompilationFinal private FastPathFactory fastPath;
 
     @CompilationFinal private boolean initialized = false;
 
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/S3FunctionLookupNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/S3FunctionLookupNode.java
index 19d0954b1caeea4434360020d2ca8893a0f83190..f759b97f10099a0cabdceaf18f9e02b8d7d8d356 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/S3FunctionLookupNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/S3FunctionLookupNode.java
@@ -4,7 +4,7 @@
  * http://www.gnu.org/licenses/gpl-2.0.html
  *
  * Copyright (c) 2014, Purdue University
- * Copyright (c) 2014, 2017, Oracle and/or its affiliates
+ * Copyright (c) 2014, 2018, Oracle and/or its affiliates
  *
  * All rights reserved.
  */
@@ -251,7 +251,7 @@ public abstract class S3FunctionLookupNode extends RBaseNode {
             cachedNode = new UseMethodFunctionLookupCachedNode(next.throwsError, next.nextMethod, genericName, type, group, null, unsuccessfulReadsCaller, unsuccessfulReadsTable,
                             reads.methodsTableRead, reads.successfulRead, reads.successfulReadTable, result.function, result.clazz, result.targetFunctionName, result.groupMatch, next);
         } else {
-            RFunction builtin = next.throwsError ? builtin = RContext.getInstance().lookupBuiltin(genericName) : null;
+            RFunction builtin = next.throwsError ? RContext.getInstance().lookupBuiltin(genericName) : null;
             cachedNode = new UseMethodFunctionLookupCachedNode(next.throwsError, next.nextMethod, genericName, type, group, builtin, unsuccessfulReadsCaller, unsuccessfulReadsTable,
                             reads.methodsTableRead, null, null, null, null, null, false, next);
         }
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/MapNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/MapNode.java
index e914f791c7562cb8bd1db8e7cfddba8d4fbea53a..80b42205420b322265e8e5ff18e5880de4ff013f 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/MapNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/MapNode.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,10 +37,6 @@ public final class MapNode extends CastNode {
         return new MapNode(mapFn);
     }
 
-    public ArgumentMapper getMapper() {
-        return mapFn;
-    }
-
     @Override
     public Object execute(Object x) {
         return mapFn.map(x);
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ProcessOutputManager.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ProcessOutputManager.java
index 84a01016a8ebc87fc3a9918e4ab3f8246e607d64..f610e494814e8014cee12a8be3281facf1bdc16b 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ProcessOutputManager.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ProcessOutputManager.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,7 +34,6 @@ public class ProcessOutputManager {
     public abstract static class OutputThread extends Thread {
         protected final InputStream is;
         protected int totalRead;
-        protected final Semaphore entry = new Semaphore(0);
         protected final Semaphore exit = new Semaphore(0);
 
         protected OutputThread(String name, InputStream is) {
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RDeparse.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RDeparse.java
index 49ca414bb964362a526ee08403405edf31b24b5f..e8738cd70ba23d5d831d231cf4b7597f037b8a7d 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RDeparse.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RDeparse.java
@@ -1182,7 +1182,7 @@ public class RDeparse {
         }
         int i = 1;
         ch = safeCharAt(name, i);
-        while ((ch != '?' && Character.isAlphabetic(ch)) || Character.isDigit(ch) || ch == '.' | ch == '_') {
+        while ((ch != '?' && Character.isAlphabetic(ch)) || Character.isDigit(ch) || ch == '.' || ch == '_') {
             i++;
             ch = safeCharAt(name, i);
         }
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RSerialize.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RSerialize.java
index 33167db9996d17a6e913220a05b9681bd97fb8da..ee28563e943c83ab9b5e032585bd83a8d8988f83 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RSerialize.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RSerialize.java
@@ -5,7 +5,7 @@
  *
  * Copyright (c) 1995-2012, The R Core Team
  * Copyright (c) 2003, The R Foundation
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates
  *
  * All rights reserved.
  */
@@ -201,11 +201,6 @@ public class RSerialize {
     }
 
     public static final class ContextStateImpl implements RContext.ContextState {
-        /**
-         * {@code true} iff we are saving the source from the deparse of an unserialized function
-         * (for debugging later).
-         */
-        boolean saveDeparse;
 
         /**
          * {@code ...getNamespace} in "namespace.R", used to callback to handle a
@@ -306,7 +301,6 @@ public class RSerialize {
      */
     public static void setSaveDeparse(boolean status) {
         ContextStateImpl serializeContextState = getContextState();
-        serializeContextState.saveDeparse = status;
     }
 
     @TruffleBoundary
@@ -579,7 +573,6 @@ public class RSerialize {
                              */
                             if (FastROptions.debugMatches("printUclosure")) {
                                 RPairList pairList = RDataFactory.createPairList(carItem, cdrItem, tagItem, type);
-                                result = pairList;
                                 if (attrItem != RNull.instance) {
                                     setAttributes(pairList, attrItem);
                                 }
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/context/RContext.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/context/RContext.java
index 397beb38bea948cc542e58b231edfdb112fea8d7..393a3df3fddce03701f21938395fb5cf51231754 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/context/RContext.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/context/RContext.java
@@ -126,7 +126,6 @@ import com.oracle.truffle.r.runtime.rng.RRNG;
  */
 public final class RContext {
 
-    public static final int CONSOLE_WIDTH = 80;
     public static ChildContextInfo childInfo;
 
     public enum ContextKind {
@@ -169,8 +168,6 @@ public final class RContext {
          * Shares all environments on the search path.
          */
         SHARE_ALL;
-
-        public static final ContextKind[] VALUES = values();
     }
 
     /**
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/NativeDataAccess.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/NativeDataAccess.java
index a1e49b53abfe6f8f9d73bc9c3b216fbb779715b7..970c53a91db9977ee5094312eddea7c689293683 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/NativeDataAccess.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/NativeDataAccess.java
@@ -98,10 +98,6 @@ public final class NativeDataAccess {
 
     private static final long EMPTY_DATA_ADDRESS = 0xBAD;
 
-    public static boolean isNativeMirror(Object o) {
-        return o instanceof NativeMirror;
-    }
-
     private static final class NativeMirror {
         /**
          * ID of the mirror, this will be used as the value for SEXP. When native up-calls to Java,
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RForeignNamedListWrapper.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RForeignNamedListWrapper.java
index 5c3be432639391b85ea7362c6c8bb0bc178392d2..c1c2575af084c9fa98032949ba0895b4bcbf0c7b 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RForeignNamedListWrapper.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RForeignNamedListWrapper.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -89,7 +89,6 @@ public final class RForeignNamedListWrapper extends RForeignWrapper implements R
             super(value);
         }
 
-        @Child private Node getSize = Message.GET_SIZE.createNode();
         @Child private Node read = Message.READ.createNode();
         @Child private Foreign2R foreign2r = Foreign2R.create();
 
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RList.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RList.java
index c886692fd1f02b6cd248f2b8199660c55aa03e93..5a5db9a7e9e3a36ef610111d92af0d7004a156ab 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RList.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RList.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,8 +40,6 @@ import com.oracle.truffle.r.runtime.data.nodes.VectorAccess;
  */
 public final class RList extends RListBase implements RAbstractListVector {
 
-    public String elementNamePrefix;
-
     RList(Object[] data) {
         super(data);
     }
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RVector.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RVector.java
index 83105b460c663e5f559ecc4c76fa039da81ef9ed..8642de18d084faca8fb0d0203c3102ce9ead244b 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RVector.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RVector.java
@@ -262,7 +262,6 @@ public abstract class RVector<ArrayT> extends RSharingAttributeStorage implement
                 // for one dimensional array, "names" is really "dimnames[[1]]" (see R documentation
                 // for "names" function)
                 RList newDimNames = RDataFactory.createList(new Object[]{newNames});
-                newDimNames.elementNamePrefix = RRuntime.DIMNAMES_LIST_ELEMENT_NAME_PREFIX;
                 putAttribute(RRuntime.DIMNAMES_ATTR_KEY, newDimNames);
             } else {
                 putAttribute(RRuntime.NAMES_ATTR_KEY, newNames);
@@ -342,7 +341,6 @@ public abstract class RVector<ArrayT> extends RSharingAttributeStorage implement
                 }
             }
             putAttribute(RRuntime.DIMNAMES_ATTR_KEY, resDimNames);
-            resDimNames.elementNamePrefix = RRuntime.DIMNAMES_LIST_ELEMENT_NAME_PREFIX;
         }
     }
 
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/NativeFunction.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/NativeFunction.java
index 091ab6b5132bf935b2cc5041ddb5c0735652db3d..93011004c39074ca332032af66ea6d3de08c38ad 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/NativeFunction.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/NativeFunction.java
@@ -87,8 +87,6 @@ public enum NativeFunction {
     rembedded_write_console("(string, sint32):void", "", baseLibrary(), true),
     rembedded_write_err_console("(string, sint32):void", "", baseLibrary(), true),
     rembedded_read_console("(string):string", "", baseLibrary(), true),
-    rembedded_native_clean_up("(sint32, sint32, sint32):void", "", baseLibrary(), true),
-    rembedded_native_suicide("(string):void", "", baseLibrary(), true),
     // user-defined RNG
     unif_init("(sint32): void", "user_", anyLibrary()),
     norm_rand("(): pointer", "user_", anyLibrary()),
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/REmbedRFFI.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/REmbedRFFI.java
index 52a059a1558a5553aeeb015339b7a1bbc4a8d673..c5c250fa38de510343e688c5281001d6722bdfe5 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/REmbedRFFI.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/REmbedRFFI.java
@@ -110,10 +110,6 @@ public final class REmbedRFFI {
         public void execute(String message) {
             call(message);
         }
-
-        public static EmbeddedSuicideNode create() {
-            return RFFIFactory.getREmbedRFFI().createEmbeddedSuicideNode();
-        }
     }
 
     public static final class EmbeddedCleanUpNode extends NativeCallNode {
@@ -124,10 +120,6 @@ public final class REmbedRFFI {
         public void execute(int x, int y, int z) {
             call(x, y, z);
         }
-
-        public static EmbeddedCleanUpNode create() {
-            return RFFIFactory.getREmbedRFFI().createEmbeddedCleanUpNode();
-        }
     }
 
     ReadConsoleNode createReadConsoleNode() {
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/Mach.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/Mach.java
index 2fdee595bcada32af5969ef56c36a6a66ac0bde3..90b879ca340130f6d5aacd296ffa2bea08ce7f10 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/Mach.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/Mach.java
@@ -5,7 +5,7 @@
  *
  * Copyright (C) 1998 Ross Ihaka
  * Copyright (c) 2000--2014, The R Core Team
- * Copyright (c) 2016, 2017, Oracle and/or its affiliates
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates
  *
  * All rights reserved.
  */
@@ -18,7 +18,7 @@ import com.oracle.truffle.r.runtime.RInternalError;
 import com.oracle.truffle.r.runtime.RRuntime;
 
 public final class Mach {
-    public Mach() {
+    private Mach() {
         // only static members
     }
 
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/distr/RMultinom.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/distr/RMultinom.java
deleted file mode 100644
index 822b14b94a898fa8d70e1c109de5f68dc0ca177a..0000000000000000000000000000000000000000
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/distr/RMultinom.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * This material is distributed under the GNU General Public License
- * Version 2. You may review the terms of this license at
- * http://www.gnu.org/licenses/gpl-2.0.html
- *
- * Copyright (c) 1995, 1996  Robert Gentleman and Ross Ihaka
- * Copyright (c) 1997-2012, The R Core Team
- * Copyright (c) 2003-2008, The R Foundation
- * Copyright (c) 2016, 2017, Oracle and/or its affiliates
- *
- * All rights reserved.
- */
-package com.oracle.truffle.r.runtime.nmath.distr;
-
-import static com.oracle.truffle.r.runtime.RError.SHOW_CALLER;
-
-import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
-import com.oracle.truffle.r.runtime.RError;
-import com.oracle.truffle.r.runtime.RError.Message;
-import com.oracle.truffle.r.runtime.RRuntime;
-import com.oracle.truffle.r.runtime.data.nodes.VectorAccess;
-import com.oracle.truffle.r.runtime.data.nodes.VectorAccess.SequentialIterator;
-import com.oracle.truffle.r.runtime.nmath.RandomFunctions.RandomNumberProvider;
-
-public final class RMultinom {
-    private RMultinom() {
-        // only static method rmultinom
-    }
-
-    /**
-     * Returns true if no element of the vector rN got assigned value NA, i.e. is stayed complete if
-     * it was before. GnuR doc: `Return' vector rN[1:K] {K := length(prob)} where rN[j] ~ Bin(n,
-     * prob[j]) , sum_j rN[j] == n, sum_j prob[j] == 1.
-     */
-    @TruffleBoundary
-    public static boolean rmultinom(int nIn, SequentialIterator probsIter, VectorAccess probsAccess, double sum, int[] rN, int rnStartIdx, RandomNumberProvider rand, Rbinom rbinom) {
-        /*
-         * This calculation is sensitive to exact values, so we try to ensure that the calculations
-         * are as accurate as possible so different platforms are more likely to give the same
-         * result.
-         */
-
-        int n = nIn;
-        int maxK = probsAccess.getLength(probsIter);
-        if (RRuntime.isNA(maxK) || maxK < 1 || RRuntime.isNA(n) || n < 0) {
-            if (rN.length > rnStartIdx) {
-                rN[rnStartIdx] = RRuntime.INT_NA;
-            }
-            return false;
-        }
-
-        /*
-         * Note: prob[K] is only used here for checking sum_k prob[k] = 1 ; Could make loop one
-         * shorter and drop that check !
-         */
-        /* LDOUBLE */double pTot = 0.;
-        probsAccess.reset(probsIter);
-        for (int k = 0; probsAccess.next(probsIter); k++) {
-            double pp = probsAccess.getDouble(probsIter) / sum;
-            if (!Double.isFinite(pp) || pp < 0. || pp > 1.) {
-                rN[rnStartIdx + k] = RRuntime.INT_NA;
-                return false;
-            }
-            pTot += pp;
-            rN[rnStartIdx + k] = 0;
-        }
-
-        /* LDOUBLE */double probSum = Math.abs(pTot - 1);
-        if (probSum > 1e-7) {
-            throw RError.error(SHOW_CALLER, Message.GENERIC, String.format("rbinom: probability sum should be 1, but is %g", pTot));
-        }
-        if (n == 0) {
-            return true;
-        }
-        if (maxK == 1 && pTot == 0.) {
-            return true; /* trivial border case: do as rbinom */
-        }
-
-        /* Generate the first K-1 obs. via binomials */
-        probsAccess.reset(probsIter);
-        for (int k = 0; probsAccess.next(probsIter) && k < maxK - 1; k++) {
-            /* (p_tot, n) are for "remaining binomial" */
-            /* LDOUBLE */double probK = probsAccess.getDouble(probsIter) / sum;
-            if (probK != 0.) {
-                double pp = probK / pTot;
-                // System.out.printf("[%d] %.17f\n", k + 1, pp);
-                rN[rnStartIdx + k] = ((pp < 1.) ? (int) rbinom.execute(n, pp, rand) :
-                /* >= 1; > 1 happens because of rounding */
-                                n);
-                n -= rN[rnStartIdx + k];
-            } else {
-                rN[rnStartIdx + k] = 0;
-            }
-            if (n <= 0) {
-                /* we have all */
-                return true;
-            }
-            /* i.e. = sum(prob[(k+1):K]) */
-            pTot -= probK;
-        }
-
-        rN[rnStartIdx + maxK - 1] = n;
-        return true;
-    }
-}
diff --git a/mx.fastr/copyrights/overrides b/mx.fastr/copyrights/overrides
index a0e848c66578e575121b6092beb8c70f51dfdcc5..cbafb063d51179a072403b8d254787e41b229576 100644
--- a/mx.fastr/copyrights/overrides
+++ b/mx.fastr/copyrights/overrides
@@ -260,7 +260,6 @@ com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/distr/Rbinom
 com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/distr/Rf.java,gnu_r_ihaka_core.copyright
 com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/distr/RGamma.java,gnu_r_ihaka_core.copyright
 com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/distr/RHyper.java,gnu_r_ihaka.copyright
-com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/distr/RMultinom.java,gnu_r_gentleman_ihaka.copyright
 com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/distr/RNBinom.java,gnu_r_ihaka_core.copyright
 com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/distr/RNchisq.java,gnu_r.copyright
 com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/distr/Rnorm.java,gnu_r.copyright