Merge branch 'develop' of https://github.com/apache/royale-compiler into develop
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index 9eb9061..6b92d5f 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -1,4 +1,22 @@
 
+Apache Royale Compiler 0.9.8
+=================
+
+- Fixed issue where problems in .mxml files were sometimes duplicated.
+- Fixed issue where unrecognized characters in .mxml files were sometimes ignored, and now an error is reported.
+- Fixed some missing syntax checks for bindable variables that should have been the same as non-bindable variables. This may produce some new errors that weren't there before (such as duplicate variable names), but they should have been.
+- Fixed issue where a type annotation referencing a class with a private constructor was not correctly resolved.
+- (JS) Source map debugging paths of SDK classes are updated to allow breakpoints in the original .as or .mxml files in the SDK when debugging in a browser or IDE.
+- (JS) Added source-map-source-root compiler option to optionally customize the source root of source maps.
+- (JS) No longer generates @export annotations for exported symbols in debug builds. Exports are smartly generated when creating a release build, and if they are disabled, they will be omitted from framework classes now too. This can help reduce the size of a release build.
+- (JS) Fixed issue where compiling a .swc library with another .swc library on the library-path did not copy the required .js files to the new .swc library. Only when a .swc library is added external-library-path should the .js files not get copied.
+- (JS) Improved reproducible builds of .swc library files by ensuring that the paths to .js.map source map files are always referenced with forward slash and never backslash. This matches the existing behavior of references to .js files included with .swc libraries.
+- (JS) Static getters/setters are not accessed with ["name"] syntax in generated JavaScript anymore, which required them to always be exported, even if the associated export symbols compiler option were disabled.
+- (JS) When internal namespace is used in ActionScript, the generated JavaScript adds the @package annotation.
+- (JS) Fixed issue where the Language class was not loaded in the correct order when type coersion is required in a static initializer.
+- (JS) (Advanced) Added export-internal-symbols and prevent-rename-internal-symbols compiler options to match the existing options for public and protected namespaces.
+- (JS) (Advanced) Added prevent-rename-public-static-methods, prevent-rename-public-instance-methods, prevent-rename-public-static-variables, prevent-rename-public-instance-variables, prevent-rename-public-static-accessors, and prevent-rename-public-instance-accessors compiler options to provide more granular control when prevent-rename-public-symbols is true (same for protected and internal namespaces too).
+
 Apache Royale Compiler 0.9.7
 =================
 
diff --git a/compiler-jx/src/main/java/com/google/javascript/jscomp/KeepRoyalePropertyNames.java b/compiler-jx/src/main/java/com/google/javascript/jscomp/KeepRoyalePropertyNames.java
new file mode 100644
index 0000000..ff73306
--- /dev/null
+++ b/compiler-jx/src/main/java/com/google/javascript/jscomp/KeepRoyalePropertyNames.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2008 The Closure Compiler Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.google.javascript.jscomp;
+
+import java.util.Set;
+
+import com.google.javascript.rhino.IR;
+import com.google.javascript.rhino.Node;
+import com.google.javascript.rhino.jstype.JSType;
+import com.google.javascript.rhino.jstype.JSTypeNative;
+
+public class KeepRoyalePropertyNames implements CompilerPass {
+	
+	private final AbstractCompiler compiler;
+	private Set<String> propertyNamesToKeep;
+
+	public KeepRoyalePropertyNames(AbstractCompiler compiler, Set<String> propertyNamesToKeep) {
+	  this.compiler = compiler;
+	  this.propertyNamesToKeep = propertyNamesToKeep;
+	}
+
+	@Override
+	public void process(Node externs, Node root) {
+	  for(String nameToKeep : propertyNamesToKeep) {
+		addExtern(nameToKeep);
+	  }
+	}
+
+	private void addExtern(String export) {
+	  Node objectPrototype = NodeUtil.newQName(compiler, "Object.prototype");
+	  JSType objCtor = compiler.getTypeRegistry().getNativeType(JSTypeNative.OBJECT_FUNCTION_TYPE);
+	  objectPrototype.getFirstChild().setJSType(objCtor);
+	  Node propstmt = IR.exprResult(IR.getprop(objectPrototype, IR.string(export)));
+	  propstmt.useSourceInfoFromForTree(getSynthesizedExternsRoot());
+	  propstmt.setOriginalName(export);
+	  getSynthesizedExternsRoot().addChildToBack(propstmt);
+	  compiler.reportChangeToEnclosingScope(propstmt);
+	}
+
+	/** Lazily create a "new" externs root for undeclared variables. */
+	private Node getSynthesizedExternsRoot() {
+	  return  compiler.getSynthesizedExternsInput().getAstRoot(compiler);
+	}
+}
diff --git a/compiler-jx/src/main/java/com/google/javascript/jscomp/RoyaleClosurePassConfig.java b/compiler-jx/src/main/java/com/google/javascript/jscomp/RoyaleClosurePassConfig.java
index dee46a3..28281cb 100644
--- a/compiler-jx/src/main/java/com/google/javascript/jscomp/RoyaleClosurePassConfig.java
+++ b/compiler-jx/src/main/java/com/google/javascript/jscomp/RoyaleClosurePassConfig.java
@@ -61,10 +61,7 @@
 import com.google.javascript.jscomp.parsing.ParserRunner;
 import com.google.javascript.jscomp.parsing.parser.FeatureSet;
 import com.google.javascript.rhino.IR;
-import com.google.javascript.rhino.JSDocInfo;
-import com.google.javascript.rhino.JSDocInfoBuilder;
 import com.google.javascript.rhino.Node;
-import com.google.javascript.rhino.Token;
 
 import java.io.File;
 import java.util.ArrayList;
@@ -345,7 +342,7 @@
     }
 
     if (propertyNamesToKeep != null && propertyNamesToKeep.size() > 0) {
-      checks.add(keepPropertyNamesPass);
+      checks.add(keepRoyalePropertyNamesPass);
     }
 
     if (extraSymbolNamesToExport != null) {
@@ -1291,39 +1288,11 @@
       }
     };
 
-    private final PassFactory keepPropertyNamesPass = 
-        new PassFactory("keep-property-names", true) {
+    private final PassFactory keepRoyalePropertyNamesPass = 
+        new PassFactory("keep-royale-property-names", true) {
           @Override
           protected CompilerPass create(final AbstractCompiler compiler) {
-            return new CompilerPass() {
-              @Override
-              public void process(Node externs, Node root) {
-
-                Node propsObj = new Node(Token.OBJECTLIT);
-                for(String nameToKeep : propertyNamesToKeep)
-                {
-                  Node nameStringKey = IR.stringKey(nameToKeep);
-                  JSDocInfoBuilder builder = new JSDocInfoBuilder(true);
-                  builder.recordExport();
-                  JSDocInfo jsDocInfo = builder.build();
-                  nameStringKey.setJSDocInfo(jsDocInfo);
-
-                  Node propertyDescriptor = new Node(Token.OBJECTLIT);
-                  propertyDescriptor.addChildToBack(IR.propdef(IR.stringKey("get"), NodeUtil.emptyFunction()));
-
-                  Node prop = IR.propdef(nameStringKey, propertyDescriptor);
-                  propsObj.addChildToBack(prop);
-                }
-
-                Node definePropertiesTarget = NodeUtil.newQName(compiler, "Object.defineProperties");
-                Node definePropertiesCall = IR.call(definePropertiesTarget, IR.objectlit(), propsObj);
-                Node expression = IR.exprResult(definePropertiesCall);
-
-                Node scriptNode = compiler.getScriptNode(sourceFileName);
-                scriptNode.addChildToBack(expression);
-                compiler.reportChangeToEnclosingScope(expression);
-              }
-            };
+            return new KeepRoyalePropertyNames(compiler, propertyNamesToKeep);
           }
 
           @Override
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/COMPJSC.java b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/COMPJSC.java
index c61356a..d010412 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/COMPJSC.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/COMPJSC.java
@@ -26,6 +26,8 @@
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+import java.nio.charset.Charset;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.time.ZoneId;
@@ -37,6 +39,10 @@
 import java.util.zip.ZipFile;
 import java.util.zip.ZipOutputStream;
 
+import com.google.debugging.sourcemap.SourceMapConsumerV3;
+import com.google.debugging.sourcemap.SourceMapGeneratorV3;
+import com.google.debugging.sourcemap.SourceMapParseException;
+
 import org.apache.commons.io.FilenameUtils;
 import org.apache.commons.io.IOUtils;
 import org.apache.royale.compiler.clients.problems.ProblemPrinter;
@@ -60,6 +66,7 @@
 import org.apache.royale.compiler.targets.ITarget.TargetType;
 import org.apache.royale.compiler.targets.ITargetSettings;
 import org.apache.royale.compiler.units.ICompilationUnit;
+import org.apache.royale.compiler.utils.SourceMapUtils;
 import org.apache.royale.swc.ISWCFileEntry;
 import org.apache.royale.swc.io.SWCReader;
 import org.apache.royale.utils.ArgumentUtil;
@@ -489,32 +496,33 @@
 	                        }
                             writer.writeTo(temp, sourceMapTemp, null);
 
-                    		String outputClassFile = getOutputClassFile(
+                    		File outputClassFile = getOutputClassFile(
                                     cu.getQualifiedNames().get(0),
                                     isExterns ? externsOut : jsOut,
-                                    false).getPath();
-                    		outputClassFile = outputClassFile.replace('\\', '/');
+                                    false);
+                            String outputClassFilePath = outputClassFile.getPath();
+                    		outputClassFilePath = outputClassFilePath.replace('\\', '/');
 	                        if (config.isVerbose())
                             {
-                                System.out.println("Writing file: " + outputClassFile);     	
+                                System.out.println("Writing file: " + outputClassFilePath);     	
                             }
 	                        ByteArrayOutputStream baos = new ByteArrayOutputStream();
 	                        temp.writeTo(baos);
-                            writeFileToZip(zipOutputStream, outputClassFile, baos, fileList);
+                            writeFileToZip(zipOutputStream, outputClassFilePath, baos, fileList);
                             if(sourceMapTemp != null)
                             {
-                                String sourceMapFile = getOutputSourceMapFile(
+                                String sourceMapFilePath = getOutputSourceMapFile(
                                     cu.getQualifiedNames().get(0),
                                     isExterns ? externsOut : jsOut,
                                     false).getPath();
-                                sourceMapFile = sourceMapFile.replace('\\', '/');
+                                sourceMapFilePath = sourceMapFilePath.replace('\\', '/');
                                 if (config.isVerbose())
                                 {
-                                    System.out.println("Writing file: " + sourceMapFile);
+                                    System.out.println("Writing file: " + sourceMapFilePath);
                                 }
     	                        baos = new ByteArrayOutputStream();
-                                sourceMapTemp.writeTo(baos);
-                                writeFileToZip(zipOutputStream, sourceMapFile, baos, fileList);
+                                processSourceMap(sourceMapTemp, baos, outputClassFile, symbol);
+                                writeFileToZip(zipOutputStream, sourceMapFilePath, baos, fileList);
                             }
                             writer.close();
                         }
@@ -676,6 +684,56 @@
         return compilationSuccess;
     }
 
+    private void processSourceMap(ByteArrayOutputStream sourceMapTemp, ByteArrayOutputStream baos, File outputClassFile, String symbol)
+    {
+        String sourceMapSourceRoot = project.config.getSourceMapSourceRoot();
+        if(sourceMapSourceRoot != null && sourceMapSourceRoot.length() > 0)
+        {
+            String sourceMapContents = null;
+            try
+            {
+                sourceMapContents = sourceMapTemp.toString("utf8");
+            }
+            catch(UnsupportedEncodingException e)
+            {
+                sourceMapContents = null;
+            }
+            if(sourceMapContents != null)
+            {
+                SourceMapConsumerV3 sourceMapConsumer = new SourceMapConsumerV3();
+                try
+                {
+                    sourceMapConsumer.parse(sourceMapContents);
+                }
+                catch(SourceMapParseException e)
+                {
+                    sourceMapConsumer = null;
+                }
+                if (sourceMapConsumer != null && !sourceMapSourceRoot.equals(sourceMapConsumer.getSourceRoot()))
+                {
+                    SourceMapGeneratorV3 sourceMapGenerator = SourceMapUtils.sourceMapConsumerToGeneratorWithRemappedSourceRoot(sourceMapConsumer, sourceMapSourceRoot, symbol);
+                    String newSourceMapContents = SourceMapUtils.sourceMapGeneratorToString(sourceMapGenerator, outputClassFile.getName());
+                    try
+                    {
+                        IOUtils.write(newSourceMapContents, baos, Charset.forName("utf8"));
+                    }
+                    catch(IOException e)
+                    {
+                    }
+                    return;
+                }
+            }
+        }
+        try
+        {
+            sourceMapTemp.writeTo(baos);
+        }
+        catch(IOException e)
+        {
+
+        }
+    }
+
     private void writeFileToZip(ZipOutputStream zipOutputStream, String entryFilePath, ByteArrayOutputStream baos, StringBuilder fileList) throws IOException
     {
         long fileDate = System.currentTimeMillis();
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/COMPJSCNative.java b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/COMPJSCNative.java
index 125e93d..a01843b 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/COMPJSCNative.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/COMPJSCNative.java
@@ -26,6 +26,8 @@
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+import java.nio.charset.Charset;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.time.ZoneId;
@@ -45,6 +47,10 @@
 import java.util.zip.ZipFile;
 import java.util.zip.ZipOutputStream;
 
+import com.google.debugging.sourcemap.SourceMapConsumerV3;
+import com.google.debugging.sourcemap.SourceMapGeneratorV3;
+import com.google.debugging.sourcemap.SourceMapParseException;
+
 import org.apache.commons.io.FilenameUtils;
 import org.apache.commons.io.IOUtils;
 import org.apache.royale.compiler.clients.problems.ProblemQuery;
@@ -69,6 +75,7 @@
 import org.apache.royale.compiler.targets.ITarget.TargetType;
 import org.apache.royale.compiler.targets.ITargetSettings;
 import org.apache.royale.compiler.units.ICompilationUnit;
+import org.apache.royale.compiler.utils.SourceMapUtils;
 import org.apache.royale.swc.ISWCFileEntry;
 import org.apache.royale.swc.io.SWCReader;
 
@@ -354,32 +361,33 @@
 	                        }
                             writer.writeTo(temp, sourceMapTemp, null);
 
-                    		String outputClassFile = getOutputClassFile(
+                    		File outputClassFile = getOutputClassFile(
                                     cu.getQualifiedNames().get(0),
                                     isExterns ? externsOut : jsOut,
-                                    false).getPath();
-                            outputClassFile = outputClassFile.replace('\\', '/');
+                                    false);
+                            String outputClassFilePath = outputClassFile.getPath();
+                            outputClassFilePath = outputClassFilePath.replace('\\', '/');
                             if (config.isVerbose())
                             {
-                                System.out.println("Writing file: " + outputClassFile);     	
+                                System.out.println("Writing file: " + outputClassFilePath);     	
                             }
 	                        ByteArrayOutputStream baos = new ByteArrayOutputStream();
 	                        temp.writeTo(baos);
-                            writeFileToZip(zipOutputStream, outputClassFile, baos, fileList);
+                            writeFileToZip(zipOutputStream, outputClassFilePath, baos, fileList);
                             if(sourceMapTemp != null)
                             {
-                                String sourceMapFile = getOutputSourceMapFile(
+                                String sourceMapFilePath = getOutputSourceMapFile(
                                     cu.getQualifiedNames().get(0),
                                     isExterns ? externsOut : jsOut,
                                     false).getPath();
-                                sourceMapFile = sourceMapFile.replace('\\', '/');
+                                sourceMapFilePath = sourceMapFilePath.replace('\\', '/');
                                 if (config.isVerbose())
                                 {
-                                    System.out.println("Writing file: " + sourceMapFile);
+                                    System.out.println("Writing file: " + sourceMapFilePath);
                                 }
     	                        baos = new ByteArrayOutputStream();
-                                sourceMapTemp.writeTo(baos);
-                                writeFileToZip(zipOutputStream, sourceMapFile, baos, fileList);
+                                processSourceMap(sourceMapTemp, baos, outputClassFile, symbol);
+                                writeFileToZip(zipOutputStream, sourceMapFilePath, baos, fileList);
                             }
                             writer.close();
                         }
@@ -473,6 +481,56 @@
         return compilationSuccess;
     }
 
+    private void processSourceMap(ByteArrayOutputStream sourceMapTemp, ByteArrayOutputStream baos, File outputClassFile, String symbol)
+    {
+        String sourceMapSourceRoot = project.config.getSourceMapSourceRoot();
+        if(sourceMapSourceRoot != null && sourceMapSourceRoot.length() > 0)
+        {
+            String sourceMapContents = null;
+            try
+            {
+                sourceMapContents = sourceMapTemp.toString("utf8");
+            }
+            catch(UnsupportedEncodingException e)
+            {
+                sourceMapContents = null;
+            }
+            if(sourceMapContents != null)
+            {
+                SourceMapConsumerV3 sourceMapConsumer = new SourceMapConsumerV3();
+                try
+                {
+                    sourceMapConsumer.parse(sourceMapContents);
+                }
+                catch(SourceMapParseException e)
+                {
+                    sourceMapConsumer = null;
+                }
+                if (sourceMapConsumer != null && !sourceMapSourceRoot.equals(sourceMapConsumer.getSourceRoot()))
+                {
+                    SourceMapGeneratorV3 sourceMapGenerator = SourceMapUtils.sourceMapConsumerToGeneratorWithRemappedSourceRoot(sourceMapConsumer, sourceMapSourceRoot, symbol);
+                    String newSourceMapContents = SourceMapUtils.sourceMapGeneratorToString(sourceMapGenerator, outputClassFile.getName());
+                    try
+                    {
+                        IOUtils.write(newSourceMapContents, baos, Charset.forName("utf8"));
+                    }
+                    catch(IOException e)
+                    {
+                    }
+                    return;
+                }
+            }
+        }
+        try
+        {
+            sourceMapTemp.writeTo(baos);
+        }
+        catch(IOException e)
+        {
+
+        }
+    }
+
     private void writeFileToZip(ZipOutputStream zipOutputStream, String entryFilePath, ByteArrayOutputStream baos, StringBuilder fileList) throws IOException
     {
         long fileDate = System.currentTimeMillis();
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/COMPJSCRoyale.java b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/COMPJSCRoyale.java
index 366de7e..0cf1e50 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/COMPJSCRoyale.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/COMPJSCRoyale.java
@@ -26,6 +26,8 @@
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+import java.nio.charset.Charset;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.time.ZoneId;
@@ -37,6 +39,10 @@
 import java.util.zip.ZipFile;
 import java.util.zip.ZipOutputStream;
 
+import com.google.debugging.sourcemap.SourceMapConsumerV3;
+import com.google.debugging.sourcemap.SourceMapGeneratorV3;
+import com.google.debugging.sourcemap.SourceMapParseException;
+
 import org.apache.commons.io.FilenameUtils;
 import org.apache.commons.io.IOUtils;
 import org.apache.royale.compiler.clients.problems.ProblemQuery;
@@ -62,6 +68,7 @@
 import org.apache.royale.compiler.targets.ITargetSettings;
 import org.apache.royale.compiler.units.ICompilationUnit;
 import org.apache.royale.compiler.units.ICompilationUnit.UnitType;
+import org.apache.royale.compiler.utils.SourceMapUtils;
 import org.apache.royale.swc.ISWCFileEntry;
 import org.apache.royale.swc.io.SWCReader;
 
@@ -375,33 +382,34 @@
 	                        }
                             writer.writeTo(temp, sourceMapTemp, null);
 
-                    		String outputClassFile = getOutputClassFile(
+                    		File outputClassFile = getOutputClassFile(
                                     cu.getQualifiedNames().get(0),
                                     isExterns ? externsOut : jsOut,
-                                    false).getPath();
-                    		outputClassFile = outputClassFile.replace('\\', '/');
+                                    false);
+                            String outputClassFilePath = outputClassFile.getPath();
+                    		outputClassFilePath = outputClassFilePath.replace('\\', '/');
 	                        if (config.isVerbose())
                             {
-                                System.out.println("Writing file: " + outputClassFile);     	
+                                System.out.println("Writing file: " + outputClassFilePath);     	
                             }
 	                        ByteArrayOutputStream baos = new ByteArrayOutputStream();
                             temp.writeTo(baos);
-                            writeFileToZip(zipOutputStream, outputClassFile, baos, fileList);
+                            writeFileToZip(zipOutputStream, outputClassFilePath, baos, fileList);
                             
                             if(sourceMapTemp != null)
                             {
-                                String sourceMapFile = getOutputSourceMapFile(
-                                                                                cu.getQualifiedNames().get(0),
-                                                                                isExterns ? externsOut : jsOut,
-                                                                                false).getPath();
-                                sourceMapFile = sourceMapFile.replace('\\', '/');
+                                String sourceMapFilePath = getOutputSourceMapFile(
+                                    cu.getQualifiedNames().get(0),
+                                    isExterns ? externsOut : jsOut,
+                                    false).getPath();
+                                sourceMapFilePath = sourceMapFilePath.replace('\\', '/');
                                 if (config.isVerbose())
                                 {
-                                    System.out.println("Writing file: " + sourceMapFile);
+                                    System.out.println("Writing file: " + sourceMapFilePath);
                                 }
                                 baos = new ByteArrayOutputStream();
-                                sourceMapTemp.writeTo(baos);
-                                writeFileToZip(zipOutputStream, sourceMapFile, baos, fileList);
+                                processSourceMap(sourceMapTemp, baos, outputClassFile, symbol);
+                                writeFileToZip(zipOutputStream, sourceMapFilePath, baos, fileList);
                             }
 	                        writer.close();
                     	}
@@ -540,6 +548,56 @@
         return compilationSuccess;
     }
 
+    private void processSourceMap(ByteArrayOutputStream sourceMapTemp, ByteArrayOutputStream baos, File outputClassFile, String symbol)
+    {
+        String sourceMapSourceRoot = project.config.getSourceMapSourceRoot();
+        if(sourceMapSourceRoot != null && sourceMapSourceRoot.length() > 0)
+        {
+            String sourceMapContents = null;
+            try
+            {
+                sourceMapContents = sourceMapTemp.toString("utf8");
+            }
+            catch(UnsupportedEncodingException e)
+            {
+                sourceMapContents = null;
+            }
+            if(sourceMapContents != null)
+            {
+                SourceMapConsumerV3 sourceMapConsumer = new SourceMapConsumerV3();
+                try
+                {
+                    sourceMapConsumer.parse(sourceMapContents);
+                }
+                catch(SourceMapParseException e)
+                {
+                    sourceMapConsumer = null;
+                }
+                if (sourceMapConsumer != null && !sourceMapSourceRoot.equals(sourceMapConsumer.getSourceRoot()))
+                {
+                    SourceMapGeneratorV3 sourceMapGenerator = SourceMapUtils.sourceMapConsumerToGeneratorWithRemappedSourceRoot(sourceMapConsumer, sourceMapSourceRoot, symbol);
+                    String newSourceMapContents = SourceMapUtils.sourceMapGeneratorToString(sourceMapGenerator, outputClassFile.getName());
+                    try
+                    {
+                        IOUtils.write(newSourceMapContents, baos, Charset.forName("utf8"));
+                    }
+                    catch(IOException e)
+                    {
+                    }
+                    return;
+                }
+            }
+        }
+        try
+        {
+            sourceMapTemp.writeTo(baos);
+        }
+        catch(IOException e)
+        {
+
+        }
+    }
+
     private void writeFileToZip(ZipOutputStream zipOutputStream, String entryFilePath, ByteArrayOutputStream baos, StringBuilder fileList) throws IOException
     {
         long fileDate = System.currentTimeMillis();
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/JSConfiguration.java b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/JSConfiguration.java
index 938a9f3..874fdea 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/JSConfiguration.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/JSConfiguration.java
@@ -133,6 +133,25 @@
     }
 
     //
+    // 'source-map-source-root'
+    //
+
+    private String sourceMapSourceRoot = null;
+
+    public String getSourceMapSourceRoot()
+    {
+        return sourceMapSourceRoot;
+    }
+
+    @Config
+    @Mapping("source-map-source-root")
+    public void setSourceMapSourceRoot(ConfigurationValue cv, String value)
+            throws ConfigurationException
+    {
+        sourceMapSourceRoot = value;
+    }
+
+    //
     // 'js-default-initializers'
     //
 
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCRoyale.java b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCRoyale.java
index 2574c5f..615904c 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCRoyale.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCRoyale.java
@@ -784,7 +784,7 @@
 						value = value.substring(0, value.length() - 1);
 						value += br.readLine();
 					}
-					sb.append(propName + ": \"" + value + "\",\n");
+					sb.append("'" + propName + "' : \"" + value + "\",\n");
 				}
 			}
 			sb.append("__end_of_bundle__: 0\n};};\n");
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/AccessorEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/AccessorEmitter.java
index 258bc8b..f4064aa 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/AccessorEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/AccessorEmitter.java
@@ -105,11 +105,10 @@
                     writeNewline();
                 	writeNewline("/**");
                     if (emitExports)
-                    	writeNewline("  * @export");
+                    	writeNewline(" * @export");
                     if (p.type != null)
-                    	writeNewline("  * @type {"+ JSGoogDocEmitter.convertASTypeToJSType(p.type.getBaseName(), p.type.getPackageName()) + "} */");
-                    else
-                    	writeNewline("  */");
+                    	writeNewline(" * @type {"+ JSGoogDocEmitter.convertASTypeToJSType(p.type.getBaseName(), p.type.getPackageName()) + "}");
+                    writeNewline(" */");
                     write(getEmitter().formatQualifiedName(qname));
                     write(ASEmitterTokens.MEMBER_ACCESS);
                     write(JSEmitterTokens.PROTOTYPE);
@@ -320,20 +319,14 @@
                 IGetterNode getterNode = p.getter;
                 ISetterNode setterNode = p.setter;
                 writeNewline("/**");
-                //if either one is marked as suppressed, both are considered to be
-                if(p.resolvedExport && !p.suppressExport)
-                {
-                    writeNewline("  * @export");
-                }
                 if (p.type != null)
                 {
                 	String typeName = p.type.getBaseName();
                 	if (getModel().isInternalClass(typeName))
     					typeName = getModel().getInternalClasses().get(typeName);
-					writeNewline("  * @type {" + JSGoogDocEmitter.convertASTypeToJSType(typeName, p.type.getPackageName()) + "} */");
+					writeNewline(" * @type {" + JSGoogDocEmitter.convertASTypeToJSType(typeName, p.type.getPackageName()) + "}");
                 }
-                else
-                	writeNewline("  */");
+                writeNewline(" */");
                 FunctionNode fnNode = getterNode != null ? (FunctionNode) getterNode : (FunctionNode) setterNode;
                 if (p.uri != null)
                 {
@@ -492,11 +485,10 @@
                     writeNewline();
                     writeNewline("/**");
                     if (emitExports)
-                    	writeNewline("  * @export");
+                    	writeNewline(" * @export");
                     if (p.type != null)
-                    	writeNewline("  * @type {" + JSGoogDocEmitter.convertASTypeToJSType(p.type.getBaseName(), p.type.getPackageName()) + "} */");
-                    else
-                    	writeNewline("  */");
+                    	writeNewline(" * @type {" + JSGoogDocEmitter.convertASTypeToJSType(p.type.getBaseName(), p.type.getPackageName()) + "}");
+                    writeNewline(" */");
                     write(getEmitter().formatQualifiedName(qname));
                     if (p.uri != null)
                     {
@@ -530,12 +522,12 @@
                     writeNewline();
                     writeNewline("/**");
                     if (p.preventRename)
-                        writeNewline("  * @nocollapse");
+                        writeNewline(" * @nocollapse");
                     if (p.resolvedExport && !p.suppressExport)
-                        writeNewline("  * @export");
+                        writeNewline(" * @export");
                     if (p.type != null)
-                        writeNewline("  * @type {" + JSGoogDocEmitter.convertASTypeToJSType(p.type.getBaseName(), p.type.getPackageName()) + "}"); 
-                    writeNewline("  */");
+                        writeNewline(" * @type {" + JSGoogDocEmitter.convertASTypeToJSType(p.type.getBaseName(), p.type.getPackageName()) + "}"); 
+                    writeNewline(" */");
                     write(getEmitter().formatQualifiedName(qname));
                     write(ASEmitterTokens.MEMBER_ACCESS);
                     if (p.uri != null)
@@ -645,12 +637,9 @@
                 ISetterNode setterNode = p.setter;
                 String baseName = p.name;
             	writeNewline("/**");
-                if (p.resolvedExport && !p.suppressExport)
-                    writeNewline("  * @export");
                 if (p.type != null)
-                	writeNewline("  * @type {" + JSGoogDocEmitter.convertASTypeToJSType(p.type.getBaseName(), p.type.getPackageName()) + "} */");
-                else
-                	writeNewline("  */");
+                	writeNewline(" * @type {" + JSGoogDocEmitter.convertASTypeToJSType(p.type.getBaseName(), p.type.getPackageName()) + "}");
+                writeNewline(" */");
 				FunctionNode fnNode = getterNode != null ? (FunctionNode) getterNode : (FunctionNode) setterNode;
 				if (p.uri != null)
 				{
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/BindableEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/BindableEmitter.java
index 31d49e1..d88c04d 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/BindableEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/BindableEmitter.java
@@ -288,8 +288,10 @@
         // export above did not work in the release build for the static getter/setter bindables,
         // solution below:
         //Commented by JT, in AccessorEmitter:
-        writeNewline("/** @export");
-        writeNewline("  * @type {"+DISPATCHER_CLASS_QNAME+"} */");
+        writeNewline("/**");
+        writeNewline(" * @export");
+        writeNewline(" * @type {"+DISPATCHER_CLASS_QNAME+"}");
+        writeNewline(" */");
         write(STATIC_DISPATCHER_GETTER);
         write(ASEmitterTokens.COLON);
         write(ASEmitterTokens.SPACE);
@@ -366,14 +368,13 @@
         String qname = fjs.formatQualifiedName(cdef.getQualifiedName());
         // 'PropName': {
 
+        writeNewline("/**");
         if (info.namespace != "public") {
-            writeNewline("/** @export");
-            writeNewline("  * @private");
-        } else {
-            writeNewline("/** @export");
+            writeNewline(" * @private");
         }
 
-        writeNewline("  * @type {"+convertASTypeToJS(info.type)+"} */");
+        writeNewline(" * @type {" + convertASTypeToJS(info.type) + "}");
+        writeNewline(" */");
         write(name);
         write(ASEmitterTokens.COLON);
         write(ASEmitterTokens.SPACE);
@@ -442,14 +443,13 @@
     {
         // TODO (mschmalle) will remove this cast as more things get abstracted
         JSRoyaleEmitter fjs = (JSRoyaleEmitter) getEmitter();
-    		String qname = (info.namespace.equals("private") && getProject().getAllowPrivateNameConflicts()) ? fjs.formatPrivateName(cdef.getQualifiedName(), name) : name;
+        String qname = (info.namespace.equals("private") && getProject().getAllowPrivateNameConflicts()) ? fjs.formatPrivateName(cdef.getQualifiedName(), name) : name;
+        writeNewline("/**");
         if (info.namespace != "public") {
-            writeNewline("/** @export");
-            writeNewline("  * @private");
-        } else {
-            writeNewline("/** @export");
+            writeNewline(" * @private");
         }
-        writeNewline("  * @type {"+convertASTypeToJS(info.type)+"} */");
+        writeNewline(" * @type {" + convertASTypeToJS(info.type) + "}");
+        writeNewline(" */");
         // 'PropName': {
         writeNewline(qname + ASEmitterTokens.COLON.getToken()
                 + ASEmitterTokens.SPACE.getToken()
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyaleEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyaleEmitter.java
index 02b2f40..12fdc87 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyaleEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyaleEmitter.java
@@ -2122,7 +2122,6 @@
             if (instanceId != null)
             {
                 indentPush();
-    	        writeNewline("/** @export */");
                 writeNewline(instanceId + ": {");
                 writeNewline("/** @this {" + formattedCName + "} */");
                 indentPush();
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyalePublisher.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyalePublisher.java
index 944003d..63b3680 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyalePublisher.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyalePublisher.java
@@ -56,6 +56,7 @@
 import java.net.URLDecoder;
 import java.nio.charset.Charset;
 import java.util.*;
+import java.util.regex.Matcher;
 
 public class MXMLRoyalePublisher extends JSGoogPublisher implements IJSGoogPublisher
 {
@@ -859,6 +860,10 @@
         return code;
     }
 
+    private String safeReplacement(String source) {
+        return source!=null ? Matcher.quoteReplacement(source) : "";
+    }
+
     protected void writeTemplate(File template, String type, String projectName, String mainClassQName, File targetDir, String deps, List<String> additionalHTML)
     		throws IOException
 	{
@@ -883,31 +888,31 @@
 
         String result = null;
         if (type.equals("release")) {
-            result = input.replaceAll("\\$\\{application\\}", projectName + ".min");
+            result = input.replaceAll("\\$\\{application\\}", safeReplacement(projectName + ".min"));
         } else {
-            result = input.replaceAll("\\$\\{application\\}", projectName);
+            result = input.replaceAll("\\$\\{application\\}", safeReplacement(projectName));
         }
         if (bgcolor != null)
-            result = result.replaceAll("\\$\\{bgcolor\\}", bgcolor);
+            result = result.replaceAll("\\$\\{bgcolor\\}", safeReplacement(bgcolor));
         //result = result.replaceAll("\\$\\{expressInstallSwf\\}", expressInstallSwf);
         if (height != null)
-        	result = result.replaceAll("\\$\\{height\\}", height.toString());
+        	result = result.replaceAll("\\$\\{height\\}", safeReplacement(height.toString()));
         if (pageTitle != null)
-            result = result.replaceAll("\\$\\{title\\}", pageTitle);
+            result = result.replaceAll("\\$\\{title\\}", safeReplacement(pageTitle));
         //result = result.replaceAll("\\$\\{version_major\\}", versionMajor);
         //result = result.replaceAll("\\$\\{version_minor\\}", versionMinor);
         //result = result.replaceAll("\\$\\{version_revision\\}", versionRevision);
         if (width != null)
-        	result = result.replaceAll("\\$\\{width\\}", width.toString());
+        	result = result.replaceAll("\\$\\{width\\}", safeReplacement(width.toString()));
         //result = result.replaceAll("\\$\\{useBrowserHistory\\}", useBrowserHistory);
 
         StringBuilder addHTML = new StringBuilder();
         addHTML.append(getTemplateAdditionalHTML(additionalHTML));
 		addHTML.append(getTemplateDependencies(type, projectName, mainClassQName, deps));
-        result = result.replaceAll("\\$\\{head\\}", addHTML.toString());
+        result = result.replaceAll("\\$\\{head\\}", safeReplacement(addHTML.toString()));
 
         String templateBody = getTemplateBody("release".equals(type) ? projectName : mainClassQName);
-        result = result.replaceAll("\\$\\{body\\}", templateBody);
+        result = result.replaceAll("\\$\\{body\\}", safeReplacement(templateBody));
 
 		writeFile(new File(targetDir, googConfiguration.getHtmlOutputFileName()), result, false);
 	}
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/driver/js/goog/JSGoogConfiguration.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/driver/js/goog/JSGoogConfiguration.java
index ff05246..e1cdcbe 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/driver/js/goog/JSGoogConfiguration.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/driver/js/goog/JSGoogConfiguration.java
@@ -484,6 +484,120 @@
     }
 
     //
+    // 'prevent-rename-public-instance-methods'
+    //
+
+    private boolean preventRenamePublicInstanceMethods = true;
+
+    public boolean getPreventRenamePublicInstanceMethods()
+    {
+        return preventRenamePublicInstanceMethods;
+    }
+
+    @Config
+    @Mapping("prevent-rename-public-instance-methods")
+    public void setPreventRenamePublicInstanceMethods(ConfigurationValue cv, boolean value)
+            throws ConfigurationException
+    {
+    	preventRenamePublicInstanceMethods = value;
+    }
+
+    //
+    // 'prevent-rename-public-static-methods'
+    //
+
+    private boolean preventRenamePublicStaticMethods = true;
+
+    public boolean getPreventRenamePublicStaticMethods()
+    {
+        return preventRenamePublicStaticMethods;
+    }
+
+    @Config
+    @Mapping("prevent-rename-public-static-methods")
+    public void setPreventRenamePublicStaticMethods(ConfigurationValue cv, boolean value)
+            throws ConfigurationException
+    {
+    	preventRenamePublicStaticMethods = value;
+    }
+
+    //
+    // 'prevent-rename-public-instance-variables'
+    //
+
+    private boolean preventRenamePublicInstanceVariables = true;
+
+    public boolean getPreventRenamePublicInstanceVariables()
+    {
+        return preventRenamePublicInstanceVariables;
+    }
+
+    @Config
+    @Mapping("prevent-rename-public-instance-variables")
+    public void setPreventRenamePublicInstanceVariables(ConfigurationValue cv, boolean value)
+            throws ConfigurationException
+    {
+    	preventRenamePublicInstanceVariables = value;
+    }
+
+    //
+    // 'prevent-rename-public-static-variables'
+    //
+
+    private boolean preventRenamePublicStaticVariables = true;
+
+    public boolean getPreventRenamePublicStaticVariables()
+    {
+        return preventRenamePublicStaticVariables;
+    }
+
+    @Config
+    @Mapping("prevent-rename-public-static-variables")
+    public void setPreventRenamePublicStaticVariables(ConfigurationValue cv, boolean value)
+            throws ConfigurationException
+    {
+    	preventRenamePublicStaticVariables = value;
+    }
+
+    //
+    // 'prevent-rename-public-instance-accessors'
+    //
+
+    private boolean preventRenamePublicInstanceAccessors = true;
+
+    public boolean getPreventRenamePublicInstanceAccessors()
+    {
+        return preventRenamePublicInstanceAccessors;
+    }
+
+    @Config
+    @Mapping("prevent-rename-public-instance-accessors")
+    public void setPreventRenamePublicInstanceAccessors(ConfigurationValue cv, boolean value)
+            throws ConfigurationException
+    {
+    	preventRenamePublicInstanceAccessors = value;
+    }
+
+    //
+    // 'prevent-rename-public-static-accessors'
+    //
+
+    private boolean preventRenamePublicStaticAccessors = true;
+
+    public boolean getPreventRenamePublicStaticAccessors()
+    {
+        return preventRenamePublicStaticAccessors;
+    }
+
+    @Config
+    @Mapping("prevent-rename-public-static-accessors")
+    public void setPreventRenamePublicStaticAccessors(ConfigurationValue cv, boolean value)
+            throws ConfigurationException
+    {
+    	preventRenamePublicStaticAccessors = value;
+    }
+
+    //
     // 'prevent-rename-protected-symbols'
     //
 
@@ -503,6 +617,120 @@
     }
 
     //
+    // 'prevent-rename-protected-instance-methods'
+    //
+
+    private boolean preventRenameProtectedInstanceMethods = true;
+
+    public boolean getPreventRenameProtectedInstanceMethods()
+    {
+        return preventRenameProtectedInstanceMethods;
+    }
+
+    @Config
+    @Mapping("prevent-rename-protected-instance-methods")
+    public void setPreventRenameProtectedInstanceMethods(ConfigurationValue cv, boolean value)
+            throws ConfigurationException
+    {
+    	preventRenameProtectedInstanceMethods = value;
+    }
+
+    //
+    // 'prevent-rename-protected-static-methods'
+    //
+
+    private boolean preventRenameProtectedStaticMethods = true;
+
+    public boolean getPreventRenameProtectedStaticMethods()
+    {
+        return preventRenameProtectedStaticMethods;
+    }
+
+    @Config
+    @Mapping("prevent-rename-protected-static-methods")
+    public void setPreventRenameProtectedStaticMethods(ConfigurationValue cv, boolean value)
+            throws ConfigurationException
+    {
+    	preventRenameProtectedStaticMethods = value;
+    }
+
+    //
+    // 'prevent-rename-protected-instance-variables'
+    //
+
+    private boolean preventRenameProtectedInstanceVariables = true;
+
+    public boolean getPreventRenameProtectedInstanceVariables()
+    {
+        return preventRenameProtectedInstanceVariables;
+    }
+
+    @Config
+    @Mapping("prevent-rename-protected-instance-variables")
+    public void setPreventRenameProtectedInstanceVariables(ConfigurationValue cv, boolean value)
+            throws ConfigurationException
+    {
+    	preventRenameProtectedInstanceVariables = value;
+    }
+
+    //
+    // 'prevent-rename-protected-static-variables'
+    //
+
+    private boolean preventRenameProtectedStaticVariables = true;
+
+    public boolean getPreventRenameProtectedStaticVariables()
+    {
+        return preventRenameProtectedStaticVariables;
+    }
+
+    @Config
+    @Mapping("prevent-rename-protected-static-variables")
+    public void setPreventRenameProtectedStaticVariables(ConfigurationValue cv, boolean value)
+            throws ConfigurationException
+    {
+    	preventRenameProtectedStaticVariables = value;
+    }
+
+    //
+    // 'prevent-rename-protected-instance-accessors'
+    //
+
+    private boolean preventRenameProtectedInstanceAccessors = true;
+
+    public boolean getPreventRenameProtectedInstanceAccessors()
+    {
+        return preventRenameProtectedInstanceAccessors;
+    }
+
+    @Config
+    @Mapping("prevent-rename-protected-instance-accessors")
+    public void setPreventRenameProtectedInstanceAccessors(ConfigurationValue cv, boolean value)
+            throws ConfigurationException
+    {
+    	preventRenameProtectedInstanceAccessors = value;
+    }
+
+    //
+    // 'prevent-rename-protected-static-accessors'
+    //
+
+    private boolean preventRenameProtectedStaticAccessors = true;
+
+    public boolean getPreventRenameProtectedStaticAccessors()
+    {
+        return preventRenameProtectedStaticAccessors;
+    }
+
+    @Config
+    @Mapping("prevent-rename-protected-static-accessors")
+    public void setPreventRenameProtectedStaticAccessors(ConfigurationValue cv, boolean value)
+            throws ConfigurationException
+    {
+    	preventRenameProtectedStaticAccessors = value;
+    }
+
+    //
     // 'prevent-rename-internal-symbols'
     //
 
@@ -521,6 +749,120 @@
     	preventRenameInternalSymbols = value;
     }
 
+    //
+    // 'prevent-rename-internal-instance-methods'
+    //
+
+    private boolean preventRenameInternalInstanceMethods = true;
+
+    public boolean getPreventRenameInternalInstanceMethods()
+    {
+        return preventRenameInternalInstanceMethods;
+    }
+
+    @Config
+    @Mapping("prevent-rename-internal-instance-methods")
+    public void setPreventRenameInternalInstanceMethods(ConfigurationValue cv, boolean value)
+            throws ConfigurationException
+    {
+    	preventRenameInternalInstanceMethods = value;
+    }
+
+    //
+    // 'prevent-rename-internal-static-methods'
+    //
+
+    private boolean preventRenameInternalStaticMethods = true;
+
+    public boolean getPreventRenameInternalStaticMethods()
+    {
+        return preventRenameInternalStaticMethods;
+    }
+
+    @Config
+    @Mapping("prevent-rename-internal-static-methods")
+    public void setPreventRenameInternalStaticMethods(ConfigurationValue cv, boolean value)
+            throws ConfigurationException
+    {
+    	preventRenameInternalStaticMethods = value;
+    }
+
+    //
+    // 'prevent-rename-internal-instance-variables'
+    //
+
+    private boolean preventRenameInternalInstanceVariables = true;
+
+    public boolean getPreventRenameInternalInstanceVariables()
+    {
+        return preventRenameInternalInstanceVariables;
+    }
+
+    @Config
+    @Mapping("prevent-rename-internal-instance-variables")
+    public void setPreventRenameInternalInstanceVariables(ConfigurationValue cv, boolean value)
+            throws ConfigurationException
+    {
+    	preventRenameInternalInstanceVariables = value;
+    }
+
+    //
+    // 'prevent-rename-internal-static-variables'
+    //
+
+    private boolean preventRenameInternalStaticVariables = true;
+
+    public boolean getPreventRenameInternalStaticVariables()
+    {
+        return preventRenameInternalStaticVariables;
+    }
+
+    @Config
+    @Mapping("prevent-rename-internal-static-variables")
+    public void setPreventRenameInternalStaticVariables(ConfigurationValue cv, boolean value)
+            throws ConfigurationException
+    {
+    	preventRenameInternalStaticVariables = value;
+    }
+
+    //
+    // 'prevent-rename-internal-instance-accessors'
+    //
+
+    private boolean preventRenameInternalInstanceAccessors = true;
+
+    public boolean getPreventRenameInternalInstanceAccessors()
+    {
+        return preventRenameInternalInstanceAccessors;
+    }
+
+    @Config
+    @Mapping("prevent-rename-internal-instance-accessors")
+    public void setPreventRenameInternalInstanceAccessors(ConfigurationValue cv, boolean value)
+            throws ConfigurationException
+    {
+    	preventRenameInternalInstanceAccessors = value;
+    }
+
+    //
+    // 'prevent-rename-internal-static-accessors'
+    //
+
+    private boolean preventRenameInternalStaticAccessors = true;
+
+    public boolean getPreventRenameInternalStaticAccessors()
+    {
+        return preventRenameInternalStaticAccessors;
+    }
+
+    @Config
+    @Mapping("prevent-rename-internal-static-accessors")
+    public void setPreventRenameInternalStaticAccessors(ConfigurationValue cv, boolean value)
+            throws ConfigurationException
+    {
+    	preventRenameInternalStaticAccessors = value;
+    }
+
     
     //
     // 'warn-public-vars'
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/graph/GoogDepsWriter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/graph/GoogDepsWriter.java
index e64e17b..ec9d248 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/graph/GoogDepsWriter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/graph/GoogDepsWriter.java
@@ -34,6 +34,7 @@
 import java.util.Set;
 
 import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
 import org.apache.royale.compiler.clients.problems.ProblemQuery;
 import org.apache.royale.compiler.common.DependencyType;
 import org.apache.royale.compiler.common.DependencyTypeSet;
@@ -49,6 +50,7 @@
 import org.apache.royale.compiler.problems.MainDefinitionQNameProblem;
 import org.apache.royale.compiler.problems.UnexpectedExceptionProblem;
 import org.apache.royale.compiler.units.ICompilationUnit;
+import org.apache.royale.compiler.utils.SourceMapUtils;
 import org.apache.royale.swc.ISWC;
 import org.apache.royale.swc.ISWCFileEntry;
 
@@ -67,6 +69,7 @@
 		this.mainName = mainClassName;
 		removeCirculars = config.getRemoveCirculars();
 		sourceMaps = config.getSourceMap();
+		sourceMapsSourceRoot = config.getSourceMapSourceRoot();
 		otherPaths = config.getSDKJSLib();
 		verbose = config.isVerbose();
 		otherPaths.add(new File(outputFolder.getParent(), "royale/Royale/src").getPath());
@@ -88,6 +91,7 @@
 	private List<ISWC> swcs;
 	private boolean removeCirculars = false;
 	private boolean sourceMaps = false;
+	private String sourceMapsSourceRoot = null;
 	private boolean verbose = false;
 	private ArrayList<GoogDep> dps;
 	private DependencyGraph graph;
@@ -121,7 +125,19 @@
 			else
 				files.add(gd.filePath);
 			visited.put(gd.className, gd);
+			if(sourceMaps)
+			{
+				if(sourceMapsSourceRoot != null && sourceMapsSourceRoot.length() > 0)
+				{
+					rewriteSourceMapSourceRoot(gd);
+				}
+				else
+				{
+					rewriteSourceMapSourceRootForFramework(gd);
+				}
+			}
 		}
+		rewriteSourceMapSourceRoot(depMap.get(mainName));
 		if (removeCirculars)
 		{
 			GoogDep mainDep = depMap.get(mainName);
@@ -140,6 +156,131 @@
 		}
 		return files;
 	}
+
+	private void rewriteSourceMapSourceRootForFramework(GoogDep gd)
+	{
+		if (!sourceMaps)
+		{
+			return;
+		}
+		File sourceMapFile = new File(gd.filePath + ".map");
+		if (!sourceMapFile.exists())
+		{
+			return;
+		}
+		String sourceMapContents = null;
+		try
+		{
+			sourceMapContents = FileUtils.readFileToString(sourceMapFile, Charset.forName("utf8"));
+		}
+		catch(IOException e)
+		{
+			return;
+		}
+		SourceMapConsumerV3 sourceMapConsumer = new SourceMapConsumerV3();
+		try
+		{
+			sourceMapConsumer.parse(sourceMapContents);
+		}
+		catch(SourceMapParseException e)
+		{
+			sourceMapConsumer = null;
+		}
+		if (sourceMapConsumer == null)
+		{
+			return;
+		}
+		String sourceRoot = sourceMapConsumer.getSourceRoot();
+		if (sourceRoot == null)
+		{
+			// sometimes, the source root is null, and that's expected
+			return;
+		}
+		int index = sourceRoot.indexOf("/frameworks/js/projects/");
+		if(index == -1)
+		{
+			index = sourceRoot.indexOf("/frameworks/projects/");
+		}
+		if(index == -1)
+		{
+			return;
+		}
+		String royalelib = System.getProperty("royalelib");
+		if(royalelib == null)
+		{
+			//can't rewrite if we don't know where to find frameworks
+			return;
+		}
+		File royalelibFile = new File(royalelib);
+		File newSourceRoot = new File(royalelibFile.getParent(), sourceRoot.substring(index + 1));
+		String newSourceRootUri = convertSourcePathToURI(newSourceRoot.getAbsolutePath());
+		if (newSourceRootUri.equals(sourceMapConsumer.getSourceRoot()))
+		{
+			//no need to rewrite
+			return;
+		}
+		SourceMapGeneratorV3 sourceMapGenerator = SourceMapUtils.sourceMapConsumerToGenerator(sourceMapConsumer);
+		sourceMapGenerator.setSourceRoot(newSourceRootUri);
+		String newSourceMapContents = SourceMapUtils.sourceMapGeneratorToString(sourceMapGenerator, new File(gd.filePath).getName());
+		try
+		{
+			FileUtils.write(sourceMapFile, newSourceMapContents, "utf8");
+		}
+		catch(IOException e)
+		{
+			return;
+		}
+	}
+
+	private void rewriteSourceMapSourceRoot(GoogDep gd)
+	{
+		if (!sourceMaps || sourceMapsSourceRoot == null || sourceMapsSourceRoot.length() == 0)
+		{
+			return;
+		}
+		File sourceMapFile = new File(gd.filePath + ".map");
+		if (!sourceMapFile.exists())
+		{
+			return;
+		}
+		String sourceMapContents = null;
+		try
+		{
+			sourceMapContents = FileUtils.readFileToString(sourceMapFile, Charset.forName("utf8"));
+		}
+		catch(IOException e)
+		{
+			return;
+		}
+		SourceMapConsumerV3 sourceMapConsumer = new SourceMapConsumerV3();
+		try
+		{
+			sourceMapConsumer.parse(sourceMapContents);
+		}
+		catch(SourceMapParseException e)
+		{
+			sourceMapConsumer = null;
+		}
+		if (sourceMapConsumer == null)
+		{
+			return;
+		}
+		if (sourceMapsSourceRoot.equals(sourceMapConsumer.getSourceRoot()))
+		{
+			//no need to rewrite
+			return;
+		}
+		SourceMapGeneratorV3 sourceMapGenerator = SourceMapUtils.sourceMapConsumerToGeneratorWithRemappedSourceRoot(sourceMapConsumer, sourceMapsSourceRoot, gd.className);
+		String newSourceMapContents = SourceMapUtils.sourceMapGeneratorToString(sourceMapGenerator, new File(gd.filePath).getName());
+		try
+		{
+			FileUtils.write(sourceMapFile, newSourceMapContents, "utf8");
+		}
+		catch(IOException e)
+		{
+			return;
+		}
+	}
 	
 	public String generateDeps(CompilerProject project, ProblemQuery problems) throws FileNotFoundException
 	{
@@ -587,7 +728,7 @@
                 if (!isGoogProvided(s))
                 {
                 	fileLines.remove(j);
-					sourceMapConsumer = removeLineFromSourceMap(sourceMapConsumer, mainFile.getName(), j);
+					sourceMapConsumer = SourceMapUtils.removeLineFromSourceMap(sourceMapConsumer, mainFile.getName(), j);
                 }
 				else
 				{
@@ -605,15 +746,15 @@
 					.append(dep)
 					.append("');");
 				fileLines.add(main.fileInfo.googProvideLine + 1, lineBuilder.toString());
-				sourceMapConsumer = addLineToSourceMap(sourceMapConsumer, mainFile.getName(), main.fileInfo.googProvideLine + 1);
+				sourceMapConsumer = SourceMapUtils.addLineToSourceMap(sourceMapConsumer, mainFile.getName(), main.fileInfo.googProvideLine + 1);
 			}
 
 			FileUtils.writeLines(mainFile, "utf8", fileLines);
 
 			if (sourceMapConsumer != null)
 			{
-				String newSourceMap = sourceMapConsumerToString(sourceMapConsumer, mainFile.getName());
-				FileUtils.write(sourceMapFile, newSourceMap, "utf8");
+				String newSourceMapContents = SourceMapUtils.sourceMapConsumerToString(sourceMapConsumer, mainFile.getName());
+				FileUtils.write(sourceMapFile, newSourceMapContents, "utf8");
 			}
 		} catch (IOException e) {
 			// TODO Auto-generated catch block
@@ -758,7 +899,7 @@
                     			sb.append(",");
                     		sb.append(s);
 							firstDependency = false;
-							sourceMapConsumer = removeLineFromSourceMap(sourceMapConsumer, depFile.getName(), finalLines.size());
+							sourceMapConsumer = SourceMapUtils.removeLineFromSourceMap(sourceMapConsumer, depFile.getName(), finalLines.size());
                         	continue;
 	                    }
                         else
@@ -787,7 +928,7 @@
 							.append(dep)
 							.append("');");
             			finalLines.add(lastRequireLine++, lineBuilder.toString());
-						sourceMapConsumer = addLineToSourceMap(sourceMapConsumer, new File(gd.filePath).getName(), lastRequireLine);
+						sourceMapConsumer = SourceMapUtils.addLineToSourceMap(sourceMapConsumer, new File(gd.filePath).getName(), lastRequireLine);
             			if (verbose)
 						{
 							System.out.println("adding require for static dependency " + dep + " to " + className);
@@ -824,7 +965,7 @@
                 		{
                 			// there is already a fileOverview but no @suppress
                 			finalLines.add(fi.fileoverviewLine + 1, " *  @suppress {missingRequire}");
-							sourceMapConsumer = addLineToSourceMap(sourceMapConsumer, depFile.getName(), fi.fileoverviewLine + 1);
+							sourceMapConsumer = SourceMapUtils.addLineToSourceMap(sourceMapConsumer, depFile.getName(), fi.fileoverviewLine + 1);
                 		}
                 		else if (fi.googProvideLine > -1)
                 		{
@@ -832,10 +973,10 @@
                 			finalLines.add(fi.googProvideLine, " *  @suppress {missingRequire}");
                 			finalLines.add(fi.googProvideLine, " *  @fileoverview");
                 			finalLines.add(fi.googProvideLine, "/**");
-							sourceMapConsumer = addLineToSourceMap(sourceMapConsumer, depFile.getName(), fi.googProvideLine);
-							sourceMapConsumer = addLineToSourceMap(sourceMapConsumer, depFile.getName(), fi.googProvideLine);
-							sourceMapConsumer = addLineToSourceMap(sourceMapConsumer, depFile.getName(), fi.googProvideLine);
-							sourceMapConsumer = addLineToSourceMap(sourceMapConsumer, depFile.getName(), fi.googProvideLine);
+							sourceMapConsumer = SourceMapUtils.addLineToSourceMap(sourceMapConsumer, depFile.getName(), fi.googProvideLine);
+							sourceMapConsumer = SourceMapUtils.addLineToSourceMap(sourceMapConsumer, depFile.getName(), fi.googProvideLine);
+							sourceMapConsumer = SourceMapUtils.addLineToSourceMap(sourceMapConsumer, depFile.getName(), fi.googProvideLine);
+							sourceMapConsumer = SourceMapUtils.addLineToSourceMap(sourceMapConsumer, depFile.getName(), fi.googProvideLine);
                 		}
                 		else
                 		{
@@ -849,7 +990,7 @@
             		{
             			// there is already a fileoverview but no @suppress
             			finalLines.add(fi.fileoverviewLine + 1, " *  @suppress {missingRequire}");
-						sourceMapConsumer = addLineToSourceMap(sourceMapConsumer, depFile.getName(), fi.fileoverviewLine + 1);
+						sourceMapConsumer = SourceMapUtils.addLineToSourceMap(sourceMapConsumer, depFile.getName(), fi.fileoverviewLine + 1);
             		}
             		else if (fi.googProvideLine > -1)
             		{
@@ -857,10 +998,10 @@
             			finalLines.add(fi.googProvideLine, " *  @suppress {missingRequire}");
             			finalLines.add(fi.googProvideLine, " *  @fileoverview");
             			finalLines.add(fi.googProvideLine, "/**");
-						sourceMapConsumer = addLineToSourceMap(sourceMapConsumer, depFile.getName(), fi.googProvideLine);
-						sourceMapConsumer = addLineToSourceMap(sourceMapConsumer, depFile.getName(), fi.googProvideLine);
-						sourceMapConsumer = addLineToSourceMap(sourceMapConsumer, depFile.getName(), fi.googProvideLine);
-						sourceMapConsumer = addLineToSourceMap(sourceMapConsumer, depFile.getName(), fi.googProvideLine);
+						sourceMapConsumer = SourceMapUtils.addLineToSourceMap(sourceMapConsumer, depFile.getName(), fi.googProvideLine);
+						sourceMapConsumer = SourceMapUtils.addLineToSourceMap(sourceMapConsumer, depFile.getName(), fi.googProvideLine);
+						sourceMapConsumer = SourceMapUtils.addLineToSourceMap(sourceMapConsumer, depFile.getName(), fi.googProvideLine);
+						sourceMapConsumer = SourceMapUtils.addLineToSourceMap(sourceMapConsumer, depFile.getName(), fi.googProvideLine);
             		}
             		else
             		{
@@ -871,14 +1012,14 @@
 
             sb.append("*/");
             finalLines.add(gd.fileInfo.googProvideLine + 1, sb.toString());
-			sourceMapConsumer = addLineToSourceMap(sourceMapConsumer, depFile.getName(), gd.fileInfo.googProvideLine + 1);
+			sourceMapConsumer = SourceMapUtils.addLineToSourceMap(sourceMapConsumer, depFile.getName(), gd.fileInfo.googProvideLine + 1);
 
 			FileUtils.writeLines(depFile, "utf8", finalLines);
 
 			if (sourceMapConsumer != null)
 			{
-				String newSourceMap = sourceMapConsumerToString(sourceMapConsumer, depFile.getName());
-				FileUtils.write(sourceMapFile, newSourceMap, "utf8");
+				String newSourceMapContents = SourceMapUtils.sourceMapConsumerToString(sourceMapConsumer, depFile.getName());
+				FileUtils.write(sourceMapFile, newSourceMapContents, "utf8");
 			}
         }
         catch (IOException e)
@@ -886,187 +1027,6 @@
             e.printStackTrace();
         }		
 	}
-
-	String sourceMapConsumerToString(SourceMapConsumerV3 consumer, String file)
-	{
-		SourceMapGeneratorV3 generator = sourceMapConsumerToGenerator(consumer);
-		StringBuilder builder = new StringBuilder();
-		try
-		{
-			generator.appendTo(builder, file);
-		}
-		catch(IOException e)
-		{
-			return "";
-		}
-		return builder.toString();
-	}
-
-	private void appendExtraMappingToGenerator(SourceMapGeneratorV3 generator,
-		String sourceName,
-		String symbolName,
-		FilePosition sourceStartPosition,
-		FilePosition startPosition,
-		FilePosition endPosition)
-	{
-		//add an extra mapping because there seems to be a bug in
-		//SourceMapGeneratorV3's appendTo() that omits the last
-		//entry, for some reason
-		FilePosition newEndPosition = new FilePosition(endPosition.getLine(), endPosition.getColumn() + 1);
-		generator.addMapping(sourceName, null, sourceStartPosition, endPosition, newEndPosition);
-	}
-
-	private SourceMapGeneratorV3 sourceMapConsumerToGenerator(SourceMapConsumerV3 consumer)
-	{
-		final SourceMapGeneratorV3 generator = new SourceMapGeneratorV3();
-		final SourceMapEntryCounter counter = new SourceMapEntryCounter();
-		generator.setSourceRoot(consumer.getSourceRoot());
-		consumer.visitMappings(counter);
-		consumer.visitMappings(new SourceMapConsumerV3.EntryVisitor()
-		{
-			private int index = 0;
-
-			@Override
-			public void visit(String sourceName,
-				String symbolName,
-				FilePosition sourceStartPosition,
-				FilePosition startPosition,
-				FilePosition endPosition) {
-				generator.addMapping(sourceName, symbolName, sourceStartPosition, startPosition, endPosition);
-				index++;
-				if(index == counter.count)
-				{
-					//add an extra mapping because there seems to be a bug in
-					//SourceMapGeneratorV3's appendTo() that omits the last
-					//entry, for some reason
-					appendExtraMappingToGenerator(generator, sourceName, symbolName, sourceStartPosition, startPosition, endPosition);
-				}
-			}
-		});
-		return generator;
-	}
-
-	class SourceMapEntryCounter implements SourceMapConsumerV3.EntryVisitor
-	{
-		private int count = 0;
-
-		@Override
-		public void visit(String sourceName,
-			String symbolName,
-			FilePosition sourceStartPosition,
-			FilePosition startPosition,
-			FilePosition endPosition) {
-			count++;
-		}
-	}
-
-	SourceMapConsumerV3 sourceMapGeneratorToConsumer(SourceMapGeneratorV3 generator, String fileName)
-	{
-		StringBuilder builder = new StringBuilder();
-		try
-		{
-			generator.appendTo(builder, fileName);
-		}
-		catch(IOException e)
-		{
-			return null;
-		}
-		SourceMapConsumerV3 consumer = new SourceMapConsumerV3();
-		try
-		{
-			consumer.parse(builder.toString());
-		}
-		catch(SourceMapParseException e)
-		{
-			return null;
-		}
-		return consumer;
-	}
-
-	SourceMapConsumerV3 addLineToSourceMap(SourceMapConsumerV3 consumer, String sourceFileName, final int lineToAdd)
-	{
-		if (consumer == null)
-		{
-			return null;
-		}
-		final SourceMapGeneratorV3 generator = new SourceMapGeneratorV3();
-		final SourceMapEntryCounter counter = new SourceMapEntryCounter();
-		generator.setSourceRoot(consumer.getSourceRoot());
-		consumer.visitMappings(counter);
-		consumer.visitMappings(new SourceMapConsumerV3.EntryVisitor()
-		{
-			private int index = 0;
-
-			@Override
-			public void visit(String sourceName,
-				String symbolName,
-				FilePosition sourceStartPosition,
-				FilePosition startPosition,
-				FilePosition endPosition) {
-				if(startPosition.getLine() >= lineToAdd)
-				{
-					startPosition = new FilePosition(startPosition.getLine() + 1, startPosition.getColumn());
-					endPosition = new FilePosition(endPosition.getLine() + 1, endPosition.getColumn());
-				}
-				generator.addMapping(sourceName, symbolName, sourceStartPosition, startPosition, endPosition);
-				index++;
-				if(index == counter.count)
-				{
-					//add an extra mapping because there seems to be a bug in
-					//SourceMapGeneratorV3's appendTo() that omits the last
-					//entry, for some reason
-					appendExtraMappingToGenerator(generator, sourceName, symbolName, sourceStartPosition, startPosition, endPosition);
-				}
-			}
-		});
-		return sourceMapGeneratorToConsumer(generator, sourceFileName);
-	}
-
-	SourceMapConsumerV3 removeLineFromSourceMap(SourceMapConsumerV3 consumer, String sourceFileName, final int lineToRemove)
-	{
-		if (consumer == null)
-		{
-			return null;
-		}
-		final SourceMapGeneratorV3 generator = new SourceMapGeneratorV3();
-		final SourceMapEntryCounter counter = new SourceMapEntryCounter();
-		generator.setSourceRoot(consumer.getSourceRoot());
-		consumer.visitMappings(counter);
-		consumer.visitMappings(new SourceMapConsumerV3.EntryVisitor()
-		{
-			private int index = 0;
-
-			@Override
-			public void visit(String sourceName,
-				String symbolName,
-				FilePosition sourceStartPosition,
-				FilePosition startPosition,
-				FilePosition endPosition) {
-				if(startPosition.getLine() == lineToRemove)
-				{
-					return;
-				}
-				if(startPosition.getLine() > lineToRemove)
-				{
-					startPosition = new FilePosition(startPosition.getLine() - 1, startPosition.getColumn());
-				}
-				if(endPosition.getLine() > lineToRemove)
-				{
-					endPosition = new FilePosition(endPosition.getLine() - 1, endPosition.getColumn());
-				}
-				generator.addMapping(sourceName, symbolName, sourceStartPosition, startPosition, endPosition);
-				index++;
-				if(index == counter.count)
-				{
-					//add an extra mapping because there seems to be a bug in
-					//SourceMapGeneratorV3's appendTo() that omits the last
-					//entry, for some reason
-					appendExtraMappingToGenerator(generator, sourceName, symbolName, sourceStartPosition, startPosition, endPosition);
-				}
-			}
-		});
-		return sourceMapGeneratorToConsumer(generator, sourceFileName);
-	}
 		
 	FileInfo getFileInfo(List<String> lines, String className)
 	{
@@ -1351,15 +1311,8 @@
 							String sourceMapFn = outputFolderPath + File.separator + classPath + ".js.map";
 							File sourceMapDestFile = new File(sourceMapFn);
 							inStream = sourceMapFileEntry.createInputStream();
-							outStream = FileUtils.openOutputStream(sourceMapDestFile);
-							b = new byte[1024 * 1024];
-							while ((bytes_read = inStream.read(b)) != -1)
-							{
-								outStream.write(b, 0, bytes_read);
-							}
-							outStream.flush();
-							outStream.close();    					
-							inStream.close();
+							String sourceMapContents = IOUtils.toString(inStream, Charset.forName("utf8"));
+							FileUtils.writeStringToFile(sourceMapDestFile, sourceMapContents, Charset.forName("utf8"));
 						}
 					}
 
@@ -1533,6 +1486,21 @@
 		path = path.replace('\\', '/');
 		return path;
 	}
+    
+    private String convertSourcePathToURI(String sourcePath)
+    {
+        if (sourcePath == null)
+        {
+            return null;
+        }
+        File file = new File(sourcePath);
+        if (file.isAbsolute())
+        {
+            sourcePath = "file:///" + sourcePath;
+        }
+        //prefer forward slash because web browser devtools expect it
+        return sourcePath.replace('\\', '/');
+    }
 	
 	boolean isGoogProvided(String className)
 	{
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/utils/ClosureUtils.java b/compiler-jx/src/main/java/org/apache/royale/compiler/utils/ClosureUtils.java
index a7ccbd8..1ae51eb 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/utils/ClosureUtils.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/utils/ClosureUtils.java
@@ -47,12 +47,29 @@
         {
             return;
         }
-		boolean preventRenamePublic = project.config != null && project.config.getPreventRenamePublicSymbols();
-        boolean preventRenameProtected = project.config != null && project.config.getPreventRenameProtectedSymbols();
-        boolean preventRenameInternal = project.config != null && project.config.getPreventRenameInternalSymbols();
-        boolean exportPublic = project.config != null && project.config.getExportPublicSymbols();
-        boolean exportProtected = project.config != null && project.config.getExportProtectedSymbols();
-        boolean exportInternal = project.config != null && project.config.getExportInternalSymbols();
+        boolean preventRenamePublicSymbols = project.config != null && project.config.getPreventRenamePublicSymbols();
+        boolean preventRenamePublicInstanceMethods = project.config != null && project.config.getPreventRenamePublicInstanceMethods();
+        boolean preventRenamePublicStaticMethods = project.config != null && project.config.getPreventRenamePublicStaticMethods();
+        boolean preventRenamePublicInstanceVariables = project.config != null && project.config.getPreventRenamePublicInstanceVariables();
+        boolean preventRenamePublicStaticVariables = project.config != null && project.config.getPreventRenamePublicStaticVariables();
+        boolean preventRenamePublicInstanceAccessors = project.config != null && project.config.getPreventRenamePublicInstanceAccessors();
+        boolean preventRenamePublicStaticAccessors = project.config != null && project.config.getPreventRenamePublicStaticAccessors();
+        
+        boolean preventRenameProtectedSymbols = project.config != null && project.config.getPreventRenameProtectedSymbols();
+        boolean preventRenameProtectedInstanceMethods = project.config != null && project.config.getPreventRenameProtectedInstanceMethods();
+        boolean preventRenameProtectedStaticMethods = project.config != null && project.config.getPreventRenameProtectedStaticMethods();
+        boolean preventRenameProtectedInstanceVariables = project.config != null && project.config.getPreventRenameProtectedInstanceVariables();
+        boolean preventRenameProtectedStaticVariables = project.config != null && project.config.getPreventRenameProtectedStaticVariables();
+        boolean preventRenameProtectedInstanceAccessors = project.config != null && project.config.getPreventRenameProtectedInstanceAccessors();
+        boolean preventRenameProtectedStaticAccessors = project.config != null && project.config.getPreventRenameProtectedStaticAccessors();
+
+        boolean preventRenameInternalSymbols = project.config != null && project.config.getPreventRenameInternalSymbols();
+        boolean preventRenameInternalInstanceMethods = project.config != null && project.config.getPreventRenameInternalInstanceMethods();
+        boolean preventRenameInternalStaticMethods =  project.config != null && project.config.getPreventRenameInternalStaticMethods();
+        boolean preventRenameInternalInstanceVariables = project.config != null && project.config.getPreventRenameInternalInstanceVariables();
+        boolean preventRenameInternalStaticVariables = project.config != null && project.config.getPreventRenameInternalStaticVariables();
+        boolean preventRenameInternalInstanceAccessors = project.config != null && project.config.getPreventRenameInternalInstanceAccessors();
+        boolean preventRenameInternalStaticAccessors = project.config != null && project.config.getPreventRenameInternalStaticAccessors();
         try
         {
             for(IASScope scope : cu.getFileScopeRequest().get().getScopes())
@@ -89,38 +106,140 @@
                         ITypeDefinition typeDef = (ITypeDefinition) def;
                         for (IDefinition localDef : typeDef.getContainedScope().getAllLocalDefinitions())
                         {
-                            if (localDef.isImplicit())
+                            if (localDef.isImplicit() || localDef.isPrivate())
                             {
                                 continue;
                             }
                             INamespaceReference nsRef = localDef.getNamespaceReference();
                             boolean isCustomNS = !nsRef.isLanguageNamespace();
-                            if ((localDef.isPublic() && preventRenamePublic)
-                                    || (isCustomNS && preventRenamePublic)
-                                    || (localDef.isProtected() && preventRenameProtected)
-                                    || (localDef.isInternal() && preventRenameInternal))
+                            boolean isMethod = localDef instanceof IFunctionDefinition
+                                && !(localDef instanceof IAccessorDefinition);
+                            boolean isVar = localDef instanceof IVariableDefinition
+                                && !(localDef instanceof IAccessorDefinition);
+                            boolean isAccessor = localDef instanceof IAccessorDefinition;
+                            if(localDef.isPublic() || isCustomNS)
                             {
-                                if (localDef instanceof IAccessorDefinition)
+                                if(!preventRenamePublicSymbols)
                                 {
-                                    if ((localDef.isPublic() && exportPublic)
-                                            || (isCustomNS && exportPublic)
-                                            || (localDef.isProtected() && exportProtected)
-                                            || (localDef.isInternal() && exportInternal))
+                                    continue;
+                                }
+                                if(localDef.isStatic())
+                                {
+                                    if(isMethod && !preventRenamePublicStaticMethods)
                                     {
-                                        //if an accessor is exported, we don't
-                                        //need to prevent renaming
-                                        //(not true for other symbol types)
+                                        continue;
+                                    }
+                                    else if(isVar && !preventRenamePublicStaticVariables)
+                                    {
+                                        continue;
+                                    }
+                                    else if(isAccessor && !preventRenamePublicStaticAccessors)
+                                    {
                                         continue;
                                     }
                                 }
-                                String baseName = localDef.getBaseName();
-                                if (isCustomNS)
+                                else // instance
                                 {
-                                    String uri = nsRef.resolveNamespaceReference(project).getURI();
-                                    baseName = JSRoyaleEmitter.formatNamespacedProperty(uri, baseName, false);
+                                    if(isMethod && !preventRenamePublicInstanceMethods)
+                                    {
+                                        continue;
+                                    }
+                                    else if(isVar && !preventRenamePublicInstanceVariables)
+                                    {
+                                        continue;
+                                    }
+                                    else if(isAccessor && !preventRenamePublicInstanceAccessors)
+                                    {
+                                        continue;
+                                    }
                                 }
-                                result.add(baseName);
                             }
+                            else if(localDef.isProtected())
+                            {
+                                if(!preventRenameProtectedSymbols)
+                                {
+                                    continue;
+                                }
+                                if(localDef.isStatic())
+                                {
+                                    if(isMethod && !preventRenameProtectedStaticMethods)
+                                    {
+                                        continue;
+                                    }
+                                    else if(isVar && !preventRenameProtectedStaticVariables)
+                                    {
+                                        continue;
+                                    }
+                                    else if(isAccessor && !preventRenameProtectedStaticAccessors)
+                                    {
+                                        continue;
+                                    }
+                                }
+                                else // instance
+                                {
+                                    if(isMethod && !preventRenameProtectedInstanceMethods)
+                                    {
+                                        continue;
+                                    }
+                                    else if(isVar && !preventRenameProtectedInstanceVariables)
+                                    {
+                                        continue;
+                                    }
+                                    else if(isAccessor && !preventRenameProtectedInstanceAccessors)
+                                    {
+                                        continue;
+                                    }
+                                }
+                            }
+                            else if(localDef.isInternal())
+                            {
+                                if(!preventRenameInternalSymbols)
+                                {
+                                    continue;
+                                }
+                                if(localDef.isStatic())
+                                {
+                                    if(isMethod && !preventRenameInternalStaticMethods)
+                                    {
+                                        continue;
+                                    }
+                                    else if(isVar && !preventRenameInternalStaticVariables)
+                                    {
+                                        continue;
+                                    }
+                                    else if(isAccessor && !preventRenameInternalStaticAccessors)
+                                    {
+                                        continue;
+                                    }
+                                }
+                                else // instance
+                                {
+                                    if(isMethod && !preventRenameInternalInstanceMethods)
+                                    {
+                                        continue;
+                                    }
+                                    else if(isVar && !preventRenameInternalInstanceVariables)
+                                    {
+                                        continue;
+                                    }
+                                    else if(isAccessor && !preventRenameInternalInstanceAccessors)
+                                    {
+                                        continue;
+                                    }
+                                }
+                            }
+                            else
+                            {
+                                //skip anything else not covered by the above cases
+                                continue;
+                            }
+                            String baseName = localDef.getBaseName();
+                            if (isCustomNS)
+                            {
+                                String uri = nsRef.resolveNamespaceReference(project).getURI();
+                                baseName = JSRoyaleEmitter.formatNamespacedProperty(uri, baseName, false);
+                            }
+                            result.add(baseName);
                         }
                     }
                 }
@@ -199,7 +318,8 @@
                                 && !(localDef instanceof IAccessorDefinition);
                             boolean isVar = localDef instanceof IVariableDefinition
                                 && !(localDef instanceof IAccessorDefinition);
-                            if (isMethod || isVar)
+                            boolean isAccessor = localDef instanceof IAccessorDefinition;
+                            if (isMethod || isVar || isAccessor)
                             {
                                 INamespaceReference nsRef = localDef.getNamespaceReference();
                                 boolean isCustomNS = !nsRef.isLanguageNamespace();
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/utils/SourceMapUtils.java b/compiler-jx/src/main/java/org/apache/royale/compiler/utils/SourceMapUtils.java
new file mode 100644
index 0000000..ba2d9bb
--- /dev/null
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/utils/SourceMapUtils.java
@@ -0,0 +1,257 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.royale.compiler.utils;
+
+import java.io.IOException;
+
+import com.google.debugging.sourcemap.FilePosition;
+import com.google.debugging.sourcemap.SourceMapConsumerV3;
+import com.google.debugging.sourcemap.SourceMapGeneratorV3;
+import com.google.debugging.sourcemap.SourceMapParseException;
+
+public class SourceMapUtils
+{
+	public static String sourceMapConsumerToString(SourceMapConsumerV3 consumer, String file)
+	{
+		SourceMapGeneratorV3 generator = sourceMapConsumerToGenerator(consumer);
+		StringBuilder builder = new StringBuilder();
+		try
+		{
+			generator.appendTo(builder, file);
+		}
+		catch(IOException e)
+		{
+			return "";
+		}
+		return builder.toString();
+	}
+
+	public static SourceMapGeneratorV3 sourceMapConsumerToGenerator(SourceMapConsumerV3 consumer)
+	{
+		final SourceMapGeneratorV3 generator = new SourceMapGeneratorV3();
+		final SourceMapEntryCounter counter = new SourceMapEntryCounter();
+		generator.setSourceRoot(consumer.getSourceRoot());
+		consumer.visitMappings(counter);
+		consumer.visitMappings(new SourceMapConsumerV3.EntryVisitor()
+		{
+			private int index = 0;
+
+			@Override
+			public void visit(String sourceName,
+				String symbolName,
+				FilePosition sourceStartPosition,
+				FilePosition startPosition,
+				FilePosition endPosition) {
+				generator.addMapping(sourceName, symbolName, sourceStartPosition, startPosition, endPosition);
+				index++;
+				if(index == counter.count)
+				{
+					//add an extra mapping because there seems to be a bug in
+					//SourceMapGeneratorV3's appendTo() that omits the last
+					//entry, for some reason
+					appendExtraMappingToGenerator(generator, sourceName, symbolName, sourceStartPosition, startPosition, endPosition);
+				}
+			}
+		});
+		return generator;
+	}
+
+	public static SourceMapGeneratorV3 sourceMapConsumerToGeneratorWithRemappedSourceRoot(SourceMapConsumerV3 consumer, String sourceRoot, String className)
+	{
+		final SourceMapGeneratorV3 generator = new SourceMapGeneratorV3();
+		final SourceMapEntryCounter counter = new SourceMapEntryCounter();
+		final String startPath = "/" + className.replace(".", "/") + ".";
+		generator.setSourceRoot(sourceRoot);
+		consumer.visitMappings(counter);
+		consumer.visitMappings(new SourceMapConsumerV3.EntryVisitor()
+		{
+			private int index = 0;
+
+			@Override
+			public void visit(String sourceName,
+					String symbolName,
+					FilePosition sourceStartPosition,
+					FilePosition startPosition,
+					FilePosition endPosition) {
+				String newSourceName = sourceName;
+				int startPathIndex = newSourceName.indexOf(startPath);
+				if(startPathIndex != -1)
+				{
+					newSourceName = newSourceName.substring(startPathIndex + 1);
+				}
+				generator.addMapping(newSourceName, symbolName, sourceStartPosition, startPosition, endPosition);
+				index++;
+				if(index == counter.count)
+				{
+					//add an extra mapping because there seems to be a bug in
+					//SourceMapGeneratorV3's appendTo() that omits the last
+					//entry, for some reason
+					appendExtraMappingToGenerator(generator, newSourceName, symbolName, sourceStartPosition, startPosition, endPosition);
+				}
+			}
+		});
+		return generator;
+	}
+
+	public static SourceMapConsumerV3 addLineToSourceMap(SourceMapConsumerV3 consumer, String sourceFileName, final int lineToAdd)
+	{
+		if (consumer == null)
+		{
+			return null;
+		}
+		final SourceMapGeneratorV3 generator = new SourceMapGeneratorV3();
+		final SourceMapEntryCounter counter = new SourceMapEntryCounter();
+		generator.setSourceRoot(consumer.getSourceRoot());
+		consumer.visitMappings(counter);
+		consumer.visitMappings(new SourceMapConsumerV3.EntryVisitor()
+		{
+			private int index = 0;
+
+			@Override
+			public void visit(String sourceName,
+				String symbolName,
+				FilePosition sourceStartPosition,
+				FilePosition startPosition,
+				FilePosition endPosition) {
+				if(startPosition.getLine() >= lineToAdd)
+				{
+					startPosition = new FilePosition(startPosition.getLine() + 1, startPosition.getColumn());
+					endPosition = new FilePosition(endPosition.getLine() + 1, endPosition.getColumn());
+				}
+				generator.addMapping(sourceName, symbolName, sourceStartPosition, startPosition, endPosition);
+				index++;
+				if(index == counter.count)
+				{
+					//add an extra mapping because there seems to be a bug in
+					//SourceMapGeneratorV3's appendTo() that omits the last
+					//entry, for some reason
+					appendExtraMappingToGenerator(generator, sourceName, symbolName, sourceStartPosition, startPosition, endPosition);
+				}
+			}
+		});
+		return sourceMapGeneratorToConsumer(generator, sourceFileName);
+	}
+
+	public static SourceMapConsumerV3 removeLineFromSourceMap(SourceMapConsumerV3 consumer, String sourceFileName, final int lineToRemove)
+	{
+		if (consumer == null)
+		{
+			return null;
+		}
+		final SourceMapGeneratorV3 generator = new SourceMapGeneratorV3();
+		final SourceMapEntryCounter counter = new SourceMapEntryCounter();
+		generator.setSourceRoot(consumer.getSourceRoot());
+		consumer.visitMappings(counter);
+		consumer.visitMappings(new SourceMapConsumerV3.EntryVisitor()
+		{
+			private int index = 0;
+
+			@Override
+			public void visit(String sourceName,
+				String symbolName,
+				FilePosition sourceStartPosition,
+				FilePosition startPosition,
+				FilePosition endPosition) {
+				if(startPosition.getLine() == lineToRemove)
+				{
+					return;
+				}
+				if(startPosition.getLine() > lineToRemove)
+				{
+					startPosition = new FilePosition(startPosition.getLine() - 1, startPosition.getColumn());
+				}
+				if(endPosition.getLine() > lineToRemove)
+				{
+					endPosition = new FilePosition(endPosition.getLine() - 1, endPosition.getColumn());
+				}
+				generator.addMapping(sourceName, symbolName, sourceStartPosition, startPosition, endPosition);
+				index++;
+				if(index == counter.count)
+				{
+					//add an extra mapping because there seems to be a bug in
+					//SourceMapGeneratorV3's appendTo() that omits the last
+					//entry, for some reason
+					appendExtraMappingToGenerator(generator, sourceName, symbolName, sourceStartPosition, startPosition, endPosition);
+				}
+			}
+		});
+		return sourceMapGeneratorToConsumer(generator, sourceFileName);
+	}
+
+	private static void appendExtraMappingToGenerator(SourceMapGeneratorV3 generator,
+		String sourceName,
+		String symbolName,
+		FilePosition sourceStartPosition,
+		FilePosition startPosition,
+		FilePosition endPosition)
+	{
+		//add an extra mapping because there seems to be a bug in
+		//SourceMapGeneratorV3's appendTo() that omits the last
+		//entry, for some reason
+		FilePosition newEndPosition = new FilePosition(endPosition.getLine(), endPosition.getColumn() + 1);
+		generator.addMapping(sourceName, null, sourceStartPosition, endPosition, newEndPosition);
+	}
+
+	private static class SourceMapEntryCounter implements SourceMapConsumerV3.EntryVisitor
+	{
+		private int count = 0;
+
+		@Override
+		public void visit(String sourceName,
+			String symbolName,
+			FilePosition sourceStartPosition,
+			FilePosition startPosition,
+			FilePosition endPosition) {
+			count++;
+		}
+	}
+
+	public static String sourceMapGeneratorToString(SourceMapGeneratorV3 generator, String fileName)
+	{
+		StringBuilder builder = new StringBuilder();
+		try
+		{
+			generator.appendTo(builder, fileName);
+		}
+		catch(IOException e)
+		{
+			return null;
+		}
+		return builder.toString();
+	}
+
+	public static SourceMapConsumerV3 sourceMapGeneratorToConsumer(SourceMapGeneratorV3 generator, String fileName)
+	{
+		String generatorString = sourceMapGeneratorToString(generator, fileName);
+		if(generatorString == null)
+		{
+			return null;
+		}
+		SourceMapConsumerV3 consumer = new SourceMapConsumerV3();
+		try
+		{
+			consumer.parse(generatorString);
+		}
+		catch(SourceMapParseException e)
+		{
+			return null;
+		}
+		return consumer;
+	}
+}
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleAccessorMembers.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleAccessorMembers.java
index a8f5ea1..e88faee 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleAccessorMembers.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleAccessorMembers.java
@@ -39,7 +39,7 @@
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n" +
 				"RoyaleTest_A.prototype.get__foo = function() {\n};\n\n\n" +
-        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n  * @type {number} */\nfoo: {\nget: RoyaleTest_A.prototype.get__foo}}\n);");
+        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n * @type {number}\n */\nfoo: {\nget: RoyaleTest_A.prototype.get__foo}}\n);");
     }
 
     @Override
@@ -51,7 +51,7 @@
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n" +
 				"RoyaleTest_A.prototype.get__foo = function() {\n  return -1;\n};\n\n\n" +
-        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n  * @type {number} */\nfoo: {\nget: RoyaleTest_A.prototype.get__foo}}\n);");
+        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n * @type {number}\n */\nfoo: {\nget: RoyaleTest_A.prototype.get__foo}}\n);");
     }
 
     @Override
@@ -63,7 +63,7 @@
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n" +
 				"RoyaleTest_A.prototype.get__foo = function() {\n  return -1;\n};\n\n\n" +
-        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n  * @export\n  * @type {number} */\nfoo: {\nget: RoyaleTest_A.prototype.get__foo}}\n);");
+        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n * @type {number}\n */\nfoo: {\nget: RoyaleTest_A.prototype.get__foo}}\n);");
     }
 
     @Override
@@ -75,7 +75,7 @@
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n * @extends {A}\n */\nB = function() {\n  B.base(this, 'constructor');\n};\ngoog.inherits(B, A);\n\n\n" +
 				"B.prototype.get__foo = function() {\n  return B.superClass_.get__foo.apply(this);\n};\n\n\n" +
-        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n  * @export\n  * @type {number} */\nfoo: {\nget: B.prototype.get__foo}}\n);");
+        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n * @type {number}\n */\nfoo: {\nget: B.prototype.get__foo}}\n);");
     }
 
     @Test
@@ -86,7 +86,7 @@
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n * @extends {A}\n */\nB = function() {\n  B.base(this, 'constructor');\n};\ngoog.inherits(B, A);\n\n\n" +
 				"B.prototype.get__foo = function() {\n  return B.superClass_.get__foo.apply(this);\n};\n\n\n" +
-        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n  * @export\n  * @type {number} */\nfoo: {\nget: B.prototype.get__foo,\nset: A.prototype.set__foo}}\n);");
+        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n * @type {number}\n */\nfoo: {\nget: B.prototype.get__foo,\nset: A.prototype.set__foo}}\n);");
     }
     
     @Override
@@ -97,9 +97,9 @@
         		IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n" +
-          "/**\n  * @nocollapse\n  * @export\n  * @type {number}\n  */\nRoyaleTest_A.foo;\n\n\n" +
+          "/**\n * @nocollapse\n * @export\n * @type {number}\n */\nRoyaleTest_A.foo;\n\n\n" +
           "RoyaleTest_A.get__foo = function() {\n  return -1;\n};\n\n\n" +
-          "Object.defineProperties(RoyaleTest_A, /** @lends {RoyaleTest_A} */ {\n/**\n  * @export\n  * @type {number} */\nfoo: {\nget: RoyaleTest_A.get__foo}}\n);");
+          "Object.defineProperties(RoyaleTest_A, /** @lends {RoyaleTest_A} */ {\n/**\n * @type {number}\n */\nfoo: {\nget: RoyaleTest_A.get__foo}}\n);");
     }
 
     @Override
@@ -111,7 +111,7 @@
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n" +
 				"RoyaleTest_A.prototype.set__foo = function(value) {\n};\n\n\n" +
-        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n  * @type {number} */\nfoo: {\nset: RoyaleTest_A.prototype.set__foo}}\n);");
+        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n * @type {number}\n */\nfoo: {\nset: RoyaleTest_A.prototype.set__foo}}\n);");
     }
 
     @Override
@@ -123,7 +123,7 @@
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n" +
 				"RoyaleTest_A.prototype.set__foo = function(value) {\n  fetch('haai');\n};\n\n\n" +
-        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n  * @type {number} */\nfoo: {\nset: RoyaleTest_A.prototype.set__foo}}\n);");
+        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n * @type {number}\n */\nfoo: {\nset: RoyaleTest_A.prototype.set__foo}}\n);");
     }
 
     @Override
@@ -135,7 +135,7 @@
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n" +
 				"RoyaleTest_A.prototype.set__foo = function(value) {\n};\n\n\n" +
-        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n  * @export\n  * @type {number} */\nfoo: {\nset: RoyaleTest_A.prototype.set__foo}}\n);");
+        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n * @type {number}\n */\nfoo: {\nset: RoyaleTest_A.prototype.set__foo}}\n);");
     }
 
     @Override
@@ -147,7 +147,7 @@
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n * @extends {A}\n */\nB = function() {\n  B.base(this, 'constructor');\n};\ngoog.inherits(B, A);\n\n\n" +
 				"B.prototype.set__foo = function(value) {\n  B.superClass_.set__foo.apply(this, [ value] );\n};\n\n\n" +
-        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n  * @export\n  * @type {number} */\nfoo: {\nset: B.prototype.set__foo}}\n);");
+        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n * @type {number}\n */\nfoo: {\nset: B.prototype.set__foo}}\n);");
     }
 
     @Override
@@ -158,9 +158,9 @@
         		IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n" +
-          "/**\n  * @export\n  * @type {number}\n  */\nRoyaleTest_A.foo;\n\n\n" +
+          "/**\n * @export\n * @type {number}\n */\nRoyaleTest_A.foo;\n\n\n" +
           "RoyaleTest_A.set__foo = function(value) {\n};\n\n\n" +
-          "Object.defineProperties(RoyaleTest_A, /** @lends {RoyaleTest_A} */ {\n/**\n  * @export\n  * @type {number} */\nfoo: {\nset: RoyaleTest_A.set__foo}}\n);");
+          "Object.defineProperties(RoyaleTest_A, /** @lends {RoyaleTest_A} */ {\n/**\n * @type {number}\n */\nfoo: {\nset: RoyaleTest_A.set__foo}}\n);");
     }
 
     @Test
@@ -171,7 +171,7 @@
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n * @extends {A}\n */\nB = function() {\n  B.base(this, 'constructor');\n};\ngoog.inherits(B, A);\n\n\n" +
 				"B.prototype.set__foo = function(value) {\n  B.superClass_.set__foo.apply(this, [ value] );\n};\n\n\n" +
-        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n  * @export\n  * @type {number} */\nfoo: {\nget: A.prototype.get__foo,\nset: B.prototype.set__foo}}\n);");
+        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n * @type {number}\n */\nfoo: {\nget: A.prototype.get__foo,\nset: B.prototype.set__foo}}\n);");
     }
     
     @Override
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleAccessors.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleAccessors.java
index 5d0390f..8cd7047 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleAccessors.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleAccessors.java
@@ -49,7 +49,7 @@
         String expected = "/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n */\nRoyaleTest_A.prototype.doStuff = function() {\n  this.label = 'hello, bye';\n  var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nRoyaleTest_A.prototype._label = null;\n\n\n" +
         		"RoyaleTest_A.prototype.get__label = function() {\n  return this._label;\n};\n\n\n" +
         		"RoyaleTest_A.prototype.set__label = function(value) {\n  this._label = value;\n};\n\n\n" +
-        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n  * @export\n  * @type {string} */\n" +
+        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n * @type {string}\n */\n" +
         		"label: {\nget: RoyaleTest_A.prototype.get__label,\nset: RoyaleTest_A.prototype.set__label}}\n);";
         assertOut(expected);
     }
@@ -64,7 +64,7 @@
         String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n */\nB.prototype.doStuff = function() {\n  this.label = this.label + 'bye';\n  var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB.prototype._label = null;\n\n\n" +
 				"B.prototype.get__label = function() {\n  return this._label;\n};\n\n\n" +
 				"B.prototype.set__label = function(value) {\n  this._label = value;\n};\n\n\n" +
-        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n  * @export\n  * @type {string} */\nlabel: {\n" +
+        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n * @type {string}\n */\nlabel: {\n" +
         		"get: B.prototype.get__label,\nset: B.prototype.set__label}}\n);"; 
         assertOut(expected);
     }
@@ -79,7 +79,7 @@
         String expected = "/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n */\nRoyaleTest_A.prototype.doStuff = function() {\n  this.label = this.label + 'bye';\n  var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nRoyaleTest_A.prototype._label = null;\n\n\n" +
 				"RoyaleTest_A.prototype.get__label = function() {\n  return this._label;\n};\n\n\n" +
 				"RoyaleTest_A.prototype.set__label = function(value) {\n  this._label = value;\n};\n\n\n" +
-				"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n  * @export\n  * @type {string} */\nlabel: {\n" +
+				"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n * @type {string}\n */\nlabel: {\n" +
 				"get: RoyaleTest_A.prototype.get__label,\nset: RoyaleTest_A.prototype.set__label}}\n);"; 
         assertOut(expected);
     }
@@ -94,7 +94,7 @@
         String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n */\nB.prototype.doStuff = function() {\n  this.label = this.label;\n  var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB.prototype._label = null;\n\n\n" +
 				"B.prototype.get__label = function() {\n  return this._label;\n};\n\n\n" +
 				"B.prototype.set__label = function(value) {\n  this._label = value;\n};\n\n\n" +
-				"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n  * @export\n  * @type {string} */\nlabel: {\n" +
+				"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n * @type {string}\n */\nlabel: {\n" +
 				"get: B.prototype.get__label,\nset: B.prototype.set__label}}\n);"; 
         assertOut(expected);
     }
@@ -109,7 +109,7 @@
         String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n */\nB.prototype.doStuff = function() {\n  var /** @type {string} */ theLabel = this.http_$$ns_apache_org$2017$custom$namespace__label;\n  this.http_$$ns_apache_org$2017$custom$namespace__label = theLabel;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB.prototype._label = null;\n\n\n" +
 				"B.prototype.http_$$ns_apache_org$2017$custom$namespace__get__label = function() {\n  return this._label;\n};\n\n\n" +
 				"B.prototype.http_$$ns_apache_org$2017$custom$namespace__set__label = function(value) {\n  this._label = value;\n};\n\n\n" +
-        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n  * @export\n  * @type {string} */\nhttp_$$ns_apache_org$2017$custom$namespace__label: {\nget: B.prototype.http_$$ns_apache_org$2017$custom$namespace__get__label,\nset: B.prototype.http_$$ns_apache_org$2017$custom$namespace__set__label}}\n);";
+        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n * @type {string}\n */\nhttp_$$ns_apache_org$2017$custom$namespace__label: {\nget: B.prototype.http_$$ns_apache_org$2017$custom$namespace__get__label,\nset: B.prototype.http_$$ns_apache_org$2017$custom$namespace__set__label}}\n);";
         assertOut(expected);
     }
 
@@ -123,7 +123,7 @@
         String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n */\nB.prototype.doStuff = function() {\n  var /** @type {string} */ theLabel = this.http_$$ns_apache_org$2017$custom$namespace__label;\n  this.http_$$ns_apache_org$2017$custom$namespace__label = theLabel;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB.prototype._label = null;\n\n\n" +
 				"B.prototype.http_$$ns_apache_org$2017$custom$namespace__get__label = function() {\n  return this._label;\n};\n\n\n" +
 				"B.prototype.http_$$ns_apache_org$2017$custom$namespace__set__label = function(value) {\n  this._label = value;\n};\n\n\n" +
-        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n  * @export\n  * @type {string} */\nhttp_$$ns_apache_org$2017$custom$namespace__label: {\nget: B.prototype.http_$$ns_apache_org$2017$custom$namespace__get__label,\nset: B.prototype.http_$$ns_apache_org$2017$custom$namespace__set__label}}\n);";
+        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n * @type {string}\n */\nhttp_$$ns_apache_org$2017$custom$namespace__label: {\nget: B.prototype.http_$$ns_apache_org$2017$custom$namespace__get__label,\nset: B.prototype.http_$$ns_apache_org$2017$custom$namespace__set__label}}\n);";
         assertOut(expected);
     }
 
@@ -135,10 +135,10 @@
                 IClassNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitClass(node);
         String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n */\nB.prototype.doStuff = function() {\n  var /** @type {string} */ theLabel = B.http_$$ns_apache_org$2017$custom$namespace__label;\n  B.http_$$ns_apache_org$2017$custom$namespace__label = theLabel;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB._label = null;\n\n\n" +
-                "/**\n  * @nocollapse\n  * @export\n  * @type {string}\n  */\nB.http_$$ns_apache_org$2017$custom$namespace__label;\n\n\n" +
+                "/**\n * @nocollapse\n * @export\n * @type {string}\n */\nB.http_$$ns_apache_org$2017$custom$namespace__label;\n\n\n" +
                 "B.http_$$ns_apache_org$2017$custom$namespace__get__label = function() {\n  return B._label;\n};\n\n\n" +
                 "B.http_$$ns_apache_org$2017$custom$namespace__set__label = function(value) {\n  B._label = value;\n};\n\n\n" +
-                "Object.defineProperties(B, /** @lends {B} */ {\n/**\n  * @export\n  * @type {string} */\nhttp_$$ns_apache_org$2017$custom$namespace__label: {\nget: B.http_$$ns_apache_org$2017$custom$namespace__get__label,\nset: B.http_$$ns_apache_org$2017$custom$namespace__set__label}}\n);";
+                "Object.defineProperties(B, /** @lends {B} */ {\n/**\n * @type {string}\n */\nhttp_$$ns_apache_org$2017$custom$namespace__label: {\nget: B.http_$$ns_apache_org$2017$custom$namespace__get__label,\nset: B.http_$$ns_apache_org$2017$custom$namespace__set__label}}\n);";
         assertOut(expected);
     }
 
@@ -150,10 +150,10 @@
                 IClassNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitClass(node);
         String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n */\nB.prototype.doStuff = function() {\n  var /** @type {string} */ theLabel = B.http_$$ns_apache_org$2017$custom$namespace__label;\n  B.http_$$ns_apache_org$2017$custom$namespace__label = theLabel;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB._label = null;\n\n\n" +
-                "/**\n  * @nocollapse\n  * @export\n  * @type {string}\n  */\nB.http_$$ns_apache_org$2017$custom$namespace__label;\n\n\n" +        
+                "/**\n * @nocollapse\n * @export\n * @type {string}\n */\nB.http_$$ns_apache_org$2017$custom$namespace__label;\n\n\n" +        
                 "B.http_$$ns_apache_org$2017$custom$namespace__get__label = function() {\n  return B._label;\n};\n\n\n" +
                 "B.http_$$ns_apache_org$2017$custom$namespace__set__label = function(value) {\n  B._label = value;\n};\n\n\n" +
-                "Object.defineProperties(B, /** @lends {B} */ {\n/**\n  * @export\n  * @type {string} */\nhttp_$$ns_apache_org$2017$custom$namespace__label: {\nget: B.http_$$ns_apache_org$2017$custom$namespace__get__label,\nset: B.http_$$ns_apache_org$2017$custom$namespace__set__label}}\n);";
+                "Object.defineProperties(B, /** @lends {B} */ {\n/**\n * @type {string}\n */\nhttp_$$ns_apache_org$2017$custom$namespace__label: {\nget: B.http_$$ns_apache_org$2017$custom$namespace__get__label,\nset: B.http_$$ns_apache_org$2017$custom$namespace__set__label}}\n);";
         assertOut(expected);
     }
 
@@ -178,7 +178,8 @@
                 "}\n};\n\n\n" +
                 "Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n" +
                 "/**\n" +
-                "  * @export\n  * @type {string} */\n" +
+                " * @type {string}\n" +
+                " */\n" +
                 "label: {\n" +
                 "get: RoyaleTest_A.prototype.get__label,\n" +
                 "set: RoyaleTest_A.prototype.set__label}}\n" +
@@ -196,7 +197,7 @@
         String expected = "/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n */\nRoyaleTest_A.prototype.doStuff = function() {\n  this.label = 'hello, bye';\n  var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nRoyaleTest_A.prototype._label = null;\n\n\n" +
 				"RoyaleTest_A.prototype.get__label = function() {\n  return this._label;\n};\n\n\n" +
 				"RoyaleTest_A.prototype.set__label = function(value) {\n  this._label = value;\n};\n\n\n" +
-        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n  * @export\n  * @type {string} */\n" +
+        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n * @type {string}\n */\n" +
         		"label: {\nget: RoyaleTest_A.prototype.get__label,\nset: RoyaleTest_A.prototype.set__label}}\n);";
         assertOut(expected);
     }
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleClass.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleClass.java
index e3a6d4e..b8f50e1 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleClass.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleClass.java
@@ -261,7 +261,7 @@
     {
         IClassNode node = getClassNode("public class B {public function B() {}; public function set baz(value:Object):void {}; public function set foo(value:Object):void {baz = value;};}");
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\norg.apache.royale.B.prototype.set__baz = function(value) {\n};\n\n\norg.apache.royale.B.prototype.set__foo = function(value) {\n  this.baz = value;\n};\n\n\nObject.defineProperties(org.apache.royale.B.prototype, /** @lends {org.apache.royale.B.prototype} */ {\n/**\n  * @export\n  * @type {Object} */\nbaz: {\nset: org.apache.royale.B.prototype.set__baz},\n/**\n  * @export\n  * @type {Object} */\nfoo: {\nset: org.apache.royale.B.prototype.set__foo}}\n);";
+        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\norg.apache.royale.B.prototype.set__baz = function(value) {\n};\n\n\norg.apache.royale.B.prototype.set__foo = function(value) {\n  this.baz = value;\n};\n\n\nObject.defineProperties(org.apache.royale.B.prototype, /** @lends {org.apache.royale.B.prototype} */ {\n/**\n * @type {Object}\n */\nbaz: {\nset: org.apache.royale.B.prototype.set__baz},\n/**\n * @type {Object}\n */\nfoo: {\nset: org.apache.royale.B.prototype.set__foo}}\n);";
         assertOut(expected);
     }
 
@@ -270,7 +270,7 @@
     {
         IClassNode node = getClassNode("public class B extends A {public function B() {}; override public function set foo(value:Object):void {super.foo = value;};} class A {public function set foo(value:Object):void {}}");
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n * @extends {org.apache.royale.A}\n */\norg.apache.royale.B = function() {\n  org.apache.royale.B.base(this, 'constructor');\n};\ngoog.inherits(org.apache.royale.B, org.apache.royale.A);\n\n\norg.apache.royale.B.prototype.set__foo = function(value) {\n  org.apache.royale.B.superClass_.set__foo.apply(this, [ value] );\n};\n\n\nObject.defineProperties(org.apache.royale.B.prototype, /** @lends {org.apache.royale.B.prototype} */ {\n/**\n  * @export\n  * @type {Object} */\nfoo: {\nset: org.apache.royale.B.prototype.set__foo}}\n);";
+        String expected = "/**\n * @constructor\n * @extends {org.apache.royale.A}\n */\norg.apache.royale.B = function() {\n  org.apache.royale.B.base(this, 'constructor');\n};\ngoog.inherits(org.apache.royale.B, org.apache.royale.A);\n\n\norg.apache.royale.B.prototype.set__foo = function(value) {\n  org.apache.royale.B.superClass_.set__foo.apply(this, [ value] );\n};\n\n\nObject.defineProperties(org.apache.royale.B.prototype, /** @lends {org.apache.royale.B.prototype} */ {\n/**\n * @type {Object}\n */\nfoo: {\nset: org.apache.royale.B.prototype.set__foo}}\n);";
         assertOut(expected);
     }
 
@@ -335,8 +335,7 @@
                           "\n" + 
                           "Object.defineProperties(org.apache.royale.B.A.prototype, /** @lends {org.apache.royale.B.A.prototype} */ {\n" + 
                           "/**\n" + 
-                          "  * @export\n" + 
-                          "  * @type {org.apache.royale.B.A} */\n" + 
+                          " * @type {org.apache.royale.B.A}\n */\n" + 
                           "a: {\n" + 
                           "get: org.apache.royale.B.A.prototype.get__a}}\n" + 
                           ");\n" + 
@@ -426,8 +425,9 @@
         		  " * @type {number}\n" +
         		  " */\n" +
         		  "org.apache.royale.A.prototype.e = NaN;Object.defineProperties(org.apache.royale.A.prototype, /** @lends {org.apache.royale.A.prototype} */ {\n" +
-        		  "/** @export\n" +
-    			  "  * @type {Object} */\n" +
+        		  "/**\n" +
+                  " * @type {Object}\n" +
+                  " */\n" +
     			  "a: {\n" +
     			  "/** @this {org.apache.royale.A} */\n" +
     			  "  get: function() {\n" +
@@ -443,9 +443,10 @@
     			  "         this, \"a\", oldValue, value));\n" +
     			  "}\n" +
     			  "}}," +
-    			  "/** @export\n" +
-        		  "  * @private\n" +
-        		  "  * @type {string} */\n" +
+    			  "/**\n" +
+        		  " * @private\n" +
+                  " * @type {string}\n" +
+                  " */\n" +
         		  "b: {\n" +
         		  "/** @this {org.apache.royale.A} */\n" +
         		  "  get: function() {\n" +
@@ -460,9 +461,10 @@
     			  "    this.dispatchEvent(org.apache.royale.events.ValueChangeEvent.createUpdateEvent(\n" +
     			  "         this, \"b\", oldValue, value));\n" +
     			  "}\n" +
-    			  "}},/** @export\n" +
-    			  "  * @private\n" +
-    			  "  * @type {number} */\n" +
+    			  "}},/**\n" +
+    			  " * @private\n" +
+                  " * @type {number}\n" + 
+                  " */\n" +
     			  "c: {\n" +
     			  "/** @this {org.apache.royale.A} */\n" +
     			  "  get: function() {\n" +
@@ -515,8 +517,9 @@
         		  " * @type {number}\n" +
         		  " */\n" +
         		  "org.apache.royale.A.prototype.e = NaN;Object.defineProperties(org.apache.royale.A.prototype, /** @lends {org.apache.royale.A.prototype} */ {\n" +
-        		  "/** @export\n" +
-    			  "  * @type {Object} */\n" +
+        		  "/**\n" +
+                  " * @type {Object}\n" +
+                  " */\n" +
     			  "a: {\n" +
     			  "/** @this {org.apache.royale.A} */\n" +
     			  "  get: function() {\n" +
@@ -532,9 +535,10 @@
     			  "         this, \"a\", oldValue, value));\n" +
     			  "}\n" +
     			  "}}," +
-    			  "/** @export\n" +
-        		  "  * @private\n" +
-        		  "  * @type {string} */\n" +
+    			  "/**\n" +
+        		  " * @private\n" +
+                  " * @type {string}\n" +
+                  " */\n" +
         		  "b: {\n" +
         		  "/** @this {org.apache.royale.A} */\n" +
         		  "  get: function() {\n" +
@@ -549,9 +553,10 @@
     			  "    this.dispatchEvent(org.apache.royale.events.ValueChangeEvent.createUpdateEvent(\n" +
     			  "         this, \"b\", oldValue, value));\n" +
     			  "}\n" +
-    			  "}},/** @export\n" +
-    			  "  * @private\n" +
-    			  "  * @type {number} */\n" +
+    			  "}},/**\n" +
+    			  " * @private\n" +
+                  " * @type {number}\n" + 
+                  " */\n" +
     			  "c: {\n" +
     			  "/** @this {org.apache.royale.A} */\n" +
     			  "  get: function() {\n" +
@@ -603,8 +608,9 @@
         		  " * @type {number}\n" +
         		  " */\n" +
         		  "org.apache.royale.A.prototype.e = NaN;Object.defineProperties(org.apache.royale.A.prototype, /** @lends {org.apache.royale.A.prototype} */ {\n" +
-        		  "/** @export\n" +
-        		  "  * @type {Object} */\n" +
+        		  "/**\n" +
+                  " * @type {Object}\n" +
+                  " */\n" +
     			  "a: {\n" +
     			  "/** @this {org.apache.royale.A} */\n" +
     			  "  get: function() {\n" +
@@ -680,11 +686,11 @@
         		"org.apache.royale.A.prototype.set__foo5 = function(value) {\n};\n\n\n" +
         		"org.apache.royale.A.prototype.http_$$ns_apache_org$2017$custom$namespace__get__foo6 = function() {\n  return null;\n};\n\n\n" +
         		"org.apache.royale.A.prototype.http_$$ns_apache_org$2017$custom$namespace__set__foo6 = function(value) {\n};\n\n\n" +
-        		"Object.defineProperties(org.apache.royale.A.prototype, /** @lends {org.apache.royale.A.prototype} */ {\n/**\n  * @export\n  * @type {Object} */\n" +
-        		    "foo1: {\nget: org.apache.royale.A.prototype.get__foo1,\nset: org.apache.royale.A.prototype.set__foo1},\n/**\n  * @type {Object} */\n" +
-        		    "foo2: {\nget: org.apache.royale.A.prototype.get__foo2,\nset: org.apache.royale.A.prototype.set__foo2},\n/**\n  * @type {Object} */\n" +
-        		    "foo3: {\nget: org.apache.royale.A.prototype.get__foo3,\nset: org.apache.royale.A.prototype.set__foo3},\n/**\n  * @type {Object} */\n" +
-        		    "foo5: {\nget: org.apache.royale.A.prototype.get__foo5,\nset: org.apache.royale.A.prototype.set__foo5},\n/**\n  * @export\n  * @type {Object} */\n" +
+        		"Object.defineProperties(org.apache.royale.A.prototype, /** @lends {org.apache.royale.A.prototype} */ {\n/**\n * @type {Object}\n */\n" +
+        		    "foo1: {\nget: org.apache.royale.A.prototype.get__foo1,\nset: org.apache.royale.A.prototype.set__foo1},\n/**\n * @type {Object}\n */\n" +
+        		    "foo2: {\nget: org.apache.royale.A.prototype.get__foo2,\nset: org.apache.royale.A.prototype.set__foo2},\n/**\n * @type {Object}\n */\n" +
+        		    "foo3: {\nget: org.apache.royale.A.prototype.get__foo3,\nset: org.apache.royale.A.prototype.set__foo3},\n/**\n * @type {Object}\n */\n" +
+        		    "foo5: {\nget: org.apache.royale.A.prototype.get__foo5,\nset: org.apache.royale.A.prototype.set__foo5},\n/**\n * @type {Object}\n */\n" +
         		    "http_$$ns_apache_org$2017$custom$namespace__foo6: {\nget: org.apache.royale.A.prototype.http_$$ns_apache_org$2017$custom$namespace__get__foo6,\n" +
         		    																"set: org.apache.royale.A.prototype.http_$$ns_apache_org$2017$custom$namespace__set__foo6}}\n);");
     }
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleExpressions.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleExpressions.java
index 085b5b6..6540ece 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleExpressions.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleExpressions.java
@@ -125,7 +125,7 @@
         		  "  return RoyaleTest_A.superClass_.isDefaultPrevented.apply(this);\n" +
         		  "};\n\n\n" +
         		  "Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n" +
-        		  "/**\n  * @export\n  * @type {Object} */\n" +
+        		  "/**\n * @type {Object}\n */\n" +
         		  "defaultPrevented: {\nget: RoyaleTest_A.prototype.get__defaultPrevented}}\n);");
     }
 
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyalePackage.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyalePackage.java
index cbced0a..a24a6b0 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyalePackage.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyalePackage.java
@@ -838,8 +838,8 @@
 				"\n" +
 				"Object.defineProperties(foo.bar.baz.A.prototype, /** @lends {foo.bar.baz.A.prototype} */ {\n" +
 				"/**\n" +
-				"  * @export\n" +
-				"  * @type {string} */\n" +
+				" * @type {string}\n" +
+				" */\n" +
 				"myString: {\n" +
 				"get: foo.bar.baz.A.prototype.get__myString,\n" +
 				"set: foo.bar.baz.A.prototype.set__myString}}\n" +
@@ -900,8 +900,8 @@
 				"\n" +
 				"Object.defineProperties(foo.bar.baz.A.InternalClass.prototype, /** @lends {foo.bar.baz.A.InternalClass.prototype} */ {\n" +
 				"/**\n" +
-				"  * @export\n" +
-				"  * @type {string} */\n" +
+				" * @type {string}\n" +
+				" */\n" +
 				"someString: {\n" +
 				"get: foo.bar.baz.A.InternalClass.prototype.get__someString,\n" +
 				"set: foo.bar.baz.A.InternalClass.prototype.set__someString}}\n" +
diff --git a/compiler-jx/src/test/resources/royale/files/MyInitialView_result.js b/compiler-jx/src/test/resources/royale/files/MyInitialView_result.js
index 6716c67..9be72e8 100644
--- a/compiler-jx/src/test/resources/royale/files/MyInitialView_result.js
+++ b/compiler-jx/src/test/resources/royale/files/MyInitialView_result.js
@@ -263,23 +263,23 @@
 
 Object.defineProperties(MyInitialView.prototype, /** @lends {MyInitialView.prototype} */ {
 /**
-  * @export
-  * @type {string} */
+ * @type {string}
+ */
 symbol: {
 get: MyInitialView.prototype.get__symbol},
 /**
-  * @export
-  * @type {string} */
+ * @type {string}
+ */
 city: {
 get: MyInitialView.prototype.get__city},
 /**
-  * @export
-  * @type {string} */
+ * @type {string}
+ */
 inputText: {
 get: MyInitialView.prototype.get__inputText},
 /**
-  * @export
-  * @type {string} */
+ * @type {string}
+ */
 comboBoxValue: {
 get: MyInitialView.prototype.get__comboBoxValue}}
 );/**
@@ -354,8 +354,7 @@
 
 
 Object.defineProperties(MyInitialView.prototype, /** @lends {MyInitialView.prototype} */ {
-/** @export */
-    lbl: {
+lbl: {
     /** @this {MyInitialView} */
     get: function() {
       return this.lbl_;
@@ -368,8 +367,7 @@
       }
     }
   },
-  /** @export */
-    timerLabel: {
+  timerLabel: {
     /** @this {MyInitialView} */
     get: function() {
       return this.timerLabel_;
@@ -382,8 +380,7 @@
       }
     }
   },
-  /** @export */
-    cityList: {
+  cityList: {
     /** @this {MyInitialView} */
     get: function() {
       return this.cityList_;
@@ -396,8 +393,7 @@
       }
     }
   },
-  /** @export */
-    input: {
+  input: {
     /** @this {MyInitialView} */
     get: function() {
       return this.input_;
@@ -410,8 +406,7 @@
       }
     }
   },
-  /** @export */
-    checkbox: {
+  checkbox: {
     /** @this {MyInitialView} */
     get: function() {
       return this.checkbox_;
@@ -424,8 +419,7 @@
       }
     }
   },
-  /** @export */
-    list: {
+  list: {
     /** @this {MyInitialView} */
     get: function() {
       return this.list_;
@@ -438,8 +432,7 @@
       }
     }
   },
-  /** @export */
-    comboBox: {
+  comboBox: {
     /** @this {MyInitialView} */
     get: function() {
       return this.comboBox_;
diff --git a/compiler-jx/src/test/resources/royale/files/RoyaleTest_again_result.js b/compiler-jx/src/test/resources/royale/files/RoyaleTest_again_result.js
index 1cf38b9..eaa5ec4 100644
--- a/compiler-jx/src/test/resources/royale/files/RoyaleTest_again_result.js
+++ b/compiler-jx/src/test/resources/royale/files/RoyaleTest_again_result.js
@@ -222,8 +222,7 @@
 
 
 Object.defineProperties(RoyaleTest_again.prototype, /** @lends {RoyaleTest_again.prototype} */ {
-/** @export */
-    service: {
+service: {
     /** @this {RoyaleTest_again} */
     get: function() {
       return this.service_;
@@ -236,8 +235,7 @@
       }
     }
   },
-  /** @export */
-    collection: {
+  collection: {
     /** @this {RoyaleTest_again} */
     get: function() {
       return this.collection_;
diff --git a/compiler-jx/src/test/resources/royale/files/models/MyModel_result.js b/compiler-jx/src/test/resources/royale/files/models/MyModel_result.js
index 378bfb1..5be3502 100644
--- a/compiler-jx/src/test/resources/royale/files/models/MyModel_result.js
+++ b/compiler-jx/src/test/resources/royale/files/models/MyModel_result.js
@@ -85,19 +85,19 @@
 
 Object.defineProperties(models.MyModel.prototype, /** @lends {models.MyModel.prototype} */ {
 /**
-  * @export
-  * @type {string} */
+ * @type {string}
+ */
 labelText: {
 get: models.MyModel.prototype.get__labelText,
 set: models.MyModel.prototype.set__labelText},
 /**
-  * @export
-  * @type {Array} */
+ * @type {Array}
+ */
 strings: {
 get: models.MyModel.prototype.get__strings},
 /**
-  * @export
-  * @type {Array} */
+ * @type {Array}
+ */
 cities: {
 get: models.MyModel.prototype.get__cities}}
 );
diff --git a/compiler-jx/src/test/resources/royale/projects/super/Base_result.js b/compiler-jx/src/test/resources/royale/projects/super/Base_result.js
index f56c691..fcaa48c 100644
--- a/compiler-jx/src/test/resources/royale/projects/super/Base_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/super/Base_result.js
@@ -49,8 +49,8 @@
 
 Object.defineProperties(Base.prototype, /** @lends {Base.prototype} */ {
 /**
-  * @export
-  * @type {string} */
+ * @type {string}
+ */
 text: {
 get: Base.prototype.get__text,
 set: Base.prototype.set__text}}
diff --git a/compiler-jx/src/test/resources/royale/projects/super/Super_result.js b/compiler-jx/src/test/resources/royale/projects/super/Super_result.js
index 617a2e3..6991be4 100644
--- a/compiler-jx/src/test/resources/royale/projects/super/Super_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/super/Super_result.js
@@ -51,8 +51,8 @@
 
 Object.defineProperties(Super.prototype, /** @lends {Super.prototype} */ {
 /**
-  * @export
-  * @type {string} */
+ * @type {string}
+ */
 text: {
 get: Super.prototype.get__text,
 set: Super.prototype.set__text}}
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/AccessorDefinition.java b/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/AccessorDefinition.java
index e47d4e8..f842087 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/AccessorDefinition.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/AccessorDefinition.java
@@ -239,7 +239,7 @@
                     ((AccessorDefinition) check).problematic = true;
                     //checking occurs twice, don't add multiple duplicate problems for the same check
                     problematic = true;
-                    project.getProblems().add(new DuplicateFunctionDefinitionProblem(getFunctionNode().getNameExpressionNode(), this.getBaseName()));
+                    project.getProblems().add(new DuplicateFunctionDefinitionProblem(getNode().getNameExpressionNode(), this.getBaseName()));
                 }
                 return true;
             }
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/mxml/MXMLScopeBuilder.java b/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/mxml/MXMLScopeBuilder.java
index 60e9353..b3c4003 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/mxml/MXMLScopeBuilder.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/mxml/MXMLScopeBuilder.java
@@ -30,6 +30,7 @@
 import java.util.LinkedList;
 import java.util.List;
 
+import org.apache.royale.compiler.internal.tree.mxml.MXMLInstanceNode;
 import org.apache.commons.io.IOUtils;
 import org.apache.royale.compiler.common.IFileSpecificationGetter;
 import org.apache.royale.compiler.common.Multiname;
@@ -662,7 +663,7 @@
 
     private void processState(IMXMLTagData tag, String qname)
     {
-        if (!qname.equals(project.getStateClass()) || tag.getMXMLDialect() == MXMLDialect.MXML_2006)
+        if (!MXMLInstanceNode.isStateClass(qname, project) || tag.getMXMLDialect() == MXMLDialect.MXML_2006)
             return;
 
         // if there is no name attribute, ignore it as a state, as name is
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/semantics/MethodBodySemanticChecker.java b/compiler/src/main/java/org/apache/royale/compiler/internal/semantics/MethodBodySemanticChecker.java
index af86af1..f76d19b 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/semantics/MethodBodySemanticChecker.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/semantics/MethodBodySemanticChecker.java
@@ -595,6 +595,8 @@
         {
             this.currentScope.addProblem(new LocalBindablePropertyProblem(iNode));
         }
+        
+        checkVariableDeclaration(iNode);
     }
     
     /**
@@ -2614,7 +2616,7 @@
 
         //  Check for ambiguity.
         IDefinition def = utils.getDefinition(var);
-        checkVariableForConflictingDefinitions(iNode, (VariableDefinition)def);
+        checkVariableForConflictingDefinitions(iNode, (IVariableDefinition)def);
 
         checkNamespaceOfDefinition(var, def, project);
         
@@ -2666,11 +2668,14 @@
             checkAssignmentValue(def, rightNode);
         }
 
-        if(SemanticUtils.isNestedClassProperty(iNode, (VariableDefinition)def))
+        if(def instanceof VariableDefinition)
         {
-            // TODO: Issue a better, mor specific diagnostic
-            // TODO: once we are allowed to add new error strings.
-            addProblem(new BURMDiagnosticNotAllowedHereProblem(iNode));
+            if(SemanticUtils.isNestedClassProperty(iNode, (VariableDefinition)def))
+            {
+                // TODO: Issue a better, mor specific diagnostic
+                // TODO: once we are allowed to add new error strings.
+                addProblem(new BURMDiagnosticNotAllowedHereProblem(iNode));
+            }
         }
     }
 
@@ -3043,7 +3048,7 @@
      * @param iNode     The node that produced the variable definition.  Used for location info for any diagnostics.
      * @param varDef   The VariableDefinition of the variable to check
      */
-    public void checkVariableForConflictingDefinitions( IASNode iNode, VariableDefinition varDef )
+    public void checkVariableForConflictingDefinitions( IASNode iNode, IVariableDefinition varDef )
     {
         MultiDefinitionType ambiguity = SemanticUtils.getMultiDefinitionType(varDef, project);
         if (ambiguity != MultiDefinitionType.NONE)
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLInstanceNode.java b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLInstanceNode.java
index 1405b81..3d6d469 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLInstanceNode.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLInstanceNode.java
@@ -57,9 +57,9 @@
 import org.apache.royale.compiler.tree.mxml.IMXMLClassReferenceNode;
 import org.apache.royale.compiler.tree.mxml.IMXMLInstanceNode;
 
-class MXMLInstanceNode extends MXMLClassReferenceNodeBase implements IMXMLInstanceNode
+public class MXMLInstanceNode extends MXMLClassReferenceNodeBase implements IMXMLInstanceNode
 {
-	private static boolean isStateClass(String instanceType, RoyaleProject project)
+	public static boolean isStateClass(String instanceType, RoyaleProject project)
 	{
 		// we are going to require that all subclasses are also named State
 		// but just in different packages.  That way we don't have to keep resolving
diff --git a/flex-compiler-oem/src/main/java/flex2/compiler/common/CompilerConfiguration.java b/flex-compiler-oem/src/main/java/flex2/compiler/common/CompilerConfiguration.java
index 7335ab7..a3c72c2 100644
--- a/flex-compiler-oem/src/main/java/flex2/compiler/common/CompilerConfiguration.java
+++ b/flex-compiler-oem/src/main/java/flex2/compiler/common/CompilerConfiguration.java
@@ -699,7 +699,7 @@
      * double-quote is dropped. The solution is to avoid inner double-quotes and put them around the whole expression:
      *    -define+="CONFIG::foo,'value'"
      */
-	private ObjectList<ConfigVar> jsconfigVars = new ObjectList<ConfigVar>();
+	// private ObjectList<ConfigVar> jsconfigVars = new ObjectList<ConfigVar>();
     
     /**
      * @return A list of ConfigVars