Merge tag 'apache-royale-0.9.8'

Official release of apache-royale-0.9.8
diff --git a/NOTICE b/NOTICE
index 5854ba4..13bb413 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
 Apache Royale Compiler
-Copyright 2020 The Apache Software Foundation
+Copyright 2021 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
diff --git a/NOTICE.base b/NOTICE.base
index 6ad82f6..6366b0f 100644
--- a/NOTICE.base
+++ b/NOTICE.base
@@ -1,5 +1,5 @@
 Apache Royale Compiler
-Copyright 2020 The Apache Software Foundation
+Copyright 2021 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
diff --git a/NOTICE.fdb b/NOTICE.fdb
index 95f5af4..4c933a8 100644
--- a/NOTICE.fdb
+++ b/NOTICE.fdb
@@ -1,5 +1,5 @@
 Apache Royale Debugger
-Copyright 2020 The Apache Software Foundation
+Copyright 2021 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
diff --git a/NOTICE.oem b/NOTICE.oem
index f02b4e9..f720ba6 100644
--- a/NOTICE.oem
+++ b/NOTICE.oem
@@ -1,5 +1,5 @@
 Apache Royale Compiler
-Copyright 2020 The Apache Software Foundation
+Copyright 2021 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
diff --git a/README b/README
index 4e5d8da..b40d44c 100644
--- a/README
+++ b/README
@@ -52,7 +52,7 @@
     SOFTWARE                                
     ==================================================================================
 
-    Java SDK 1.7 or greater (*1)            
+    Java SDK 8 or greater (*1)            
 
     Maven 3.3.9 or greater (*1)              
 
@@ -255,7 +255,7 @@
     into an Apache Royale SDK and the lib folder in the repository working copy.
 
         antlr - https://repo1.maven.org/maven2/org/antlr/antlr-complete/3.5.2/antlr-3.5.2-complete.jar
-	args4j = http://search.maven.org/remotecontent?filepath=args4j/args4j/2.0.28/args4j-2.0.28.jar
+        args4j = http://search.maven.org/remotecontent?filepath=args4j/args4j/2.0.28/args4j-2.0.28.jar
         commons-cli - https://repo1.maven.org/maven2/commons-cli/commons-cli/1.2/commons-cli-1.2-bin.tar.gz
         commons-io - https://repo1.maven.org/maven2/commons-io/commons-io/2.4/commons-io-2.4.tar.gz
         commons-lang - https://repo1.maven.org/maven2/commons-lang/commons-lang/2.6/commons-lang-2.6.tar.gz
@@ -265,7 +265,7 @@
         jburg - https://repo1.maven.org/maven2/net/sourceforge/jburg/jburg/1.10.2/jburg-1.10.2.jar
         jflex - https://jflex.de/jflex-1.6.0.tar.gz
         lzma - http://www.java2s.com/Code/JarDownload/lzma/lzma-9.20.jar.zip
-        Google Closure Compiler - http://github.com/google/closure-compiler/archive/v	20181210.zip
+        Google Closure Compiler - http://github.com/google/closure-compiler/archive/v20181210.zip
 
     The Google Closure Compiler includes files originally from Rhino under MPL 1.1.  For
     details see:
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index 9eb9061..8e829b6 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -1,3 +1,23 @@
+For additional information on recent issues that have been closed, see [Github Issues List](https://github.com/apache/royale-compiler/issues?q=is%3Aissue+is%3Aclosed)
+
+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.
+- Improvements/Fixes in Binding support, added support for binding inheritance, similar to Flex.
+- (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
 =================
@@ -34,8 +54,7 @@
  - (JS) Fix "missing var keyword" warning from Closure compiler for type definitions.
  - (SWF/JS) Fix missing error for calling a getter as a function (similar to attempting to call a variable as a function) when it is the wrong type.
  - (JS) Fix missing . in generated JS when using static getter/setter in a custom namespace.
-
- For additional information on recent issues that have been closed, see [Github Issues List](https://github.com/apache/royale-compiler/issues?q=is%3Aissue+is%3Aclosed)
+ 
 
 Apache Royale Compiler 0.9.6
 =================
diff --git a/build.properties b/build.properties
index 7d0e2f6..a3d7ea8 100644
--- a/build.properties
+++ b/build.properties
@@ -18,9 +18,9 @@
 ################################################################################
 
 ##used by Ant scripts
-release.version=0.9.7
+release.version=0.9.8
 ##used by release jobs on Jenkins
-releaseversion=0.9.7
+releaseversion=0.9.8
 developbranchname=develop
 
 generated.by.match=/\\*\\*. \\* Generated by Apache Royale Compiler
diff --git a/build.xml b/build.xml
index 7f47fe1..4f9086f 100644
--- a/build.xml
+++ b/build.xml
@@ -65,6 +65,7 @@
         <ant dir="compiler-test-utils" />
         <ant dir="compiler-common" />
         <ant dir="compiler-externc" />
+        <ant dir="compiler-playerglobalc" />
         <ant dir="compiler" />
     </target>
 
@@ -131,6 +132,7 @@
         <ant dir="compiler-jburg-types" target="clean"/>
         <ant dir="compiler-common" target="clean"/>
         <ant dir="compiler-externc" target="clean"/>
+        <ant dir="compiler-playerglobalc" target="clean"/>
         <ant dir="compiler" target="clean"/>
         <ant dir="compiler/src/test" target="clean"/>
         <ant dir="compiler-jx" target="clean"/>
@@ -148,8 +150,9 @@
         <ant dir="compiler-jburg-types" target="wipe"/>
         <ant dir="compiler-common" target="wipe"/>
         <ant dir="compiler-externc" target="wipe"/>
+        <ant dir="compiler-playerglobalc" target="wipe"/>
         <ant dir="compiler" target="wipe"/>
-        <ant dir="compiler/src/tests" target="wipe"/>
+        <ant dir="compiler/src/test" target="wipe"/>
     </target>
     
     <target name="wipe-all" description="Wipes out everything that didn't come from Git.">
@@ -158,6 +161,7 @@
         <ant dir="compiler-test-utils" target="wipe"/>
         <ant dir="compiler-common" target="wipe"/>
         <ant dir="compiler-externc" target="wipe"/>
+        <ant dir="compiler-playerglobalc" target="wipe"/>
         <ant dir="compiler" target="wipe"/>
         <ant dir="compiler/src/test" target="wipe"/>
 		<ant dir="compiler-jx" target="super-clean"/>
@@ -270,7 +274,7 @@
                 <include name="NOTICE.base"/>
                 <include name="NOTICE.fdb"/>
                 <include name="NOTICE.oem"/>
-                <include name="RELEASE_NOTES"/>
+                <include name="RELEASE_NOTES.md"/>
                 <include name="installer.xml"/>
                 <include name="installer.properties/**"/>
                 <include name="pom.xml"/>
@@ -414,6 +418,21 @@
                 <exclude name="**/unittest.properties" />
             </fileset>
         </copy>
+	<copy todir="${staging-dir}/compiler-playerglobalc" includeEmptyDirs="false">
+		<fileset dir="${basedir}/compiler-playerglobalc">
+			<include name="**"/>
+			<exclude name=".classpath" />
+			<exclude name=".project" />
+			<exclude name=".settings/**" />
+			<exclude name="in/**"/>
+			<exclude name="lib/**"/>
+			<exclude name="target/classes/**"/>
+			<exclude name="target/test-classes/**"/>
+			<exclude name="target/junit-temp/**"/>
+			<exclude name="target/junit-reports/**"/>
+			<exclude name="**/unittest.properties" />
+		</fileset>
+	</copy>
 
         <tstamp>
             <format property="build.number.date" pattern="yyyyMMdd" />
diff --git a/compiler-build-tools/RELEASE_NOTES.md b/compiler-build-tools/RELEASE_NOTES.md
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/compiler-build-tools/RELEASE_NOTES.md
@@ -0,0 +1 @@
+
diff --git a/compiler-build-tools/build.xml b/compiler-build-tools/build.xml
index b548f01..4ea1a61 100644
--- a/compiler-build-tools/build.xml
+++ b/compiler-build-tools/build.xml
@@ -81,6 +81,22 @@
         </javac>
 	</target>
 	
+    <!-- The OrderSwitches tool is used to order a switch statement from
+         JFlex for reproducible binaries  -->
+    <target name="order.switches"
+            description="Compiles the OrderSwitches build tool" >
+        <mkdir dir="${compiler-build-tools}/target/classes"/>
+        <javac debug="${javac.debug}" deprecation="${javac.deprecation}" destdir="${compiler-build-tools}/target/classes" includeAntRuntime="true"
+            source="${javac.src}" target="${javac.src}">
+            <compilerarg value="-Xlint:all,-path,-fallthrough"/>
+            <src path="${compiler-build-tools}/src/main/java"/>
+            <include name="org/apache/royale/compiler/tools/annotate/OrderSwitches.java"/>
+            <classpath>
+                <pathelement location="${compiler-build-tools}/target/classes"/>
+            </classpath>
+        </javac>
+    </target>
+    
 	<!-- The UnknownTreePatternInputOutput tool is used to compile an XML file containing unknown AST patterns to a Java class -->
     <target name="unknown.tree.pattern.input.output"
             description="Compiles the UnknownTreePatternInputOutput tool">
@@ -108,7 +124,7 @@
 	    </javac>
 	</target>
 
-    <target name="main" depends="annotate.class, unknown.tree.pattern.input.output" />
+    <target name="main" depends="annotate.class,order.switches, unknown.tree.pattern.input.output" />
     
     <!--
 
diff --git a/compiler-build-tools/pom.xml b/compiler-build-tools/pom.xml
index 62844bc..a2fe1d6 100644
--- a/compiler-build-tools/pom.xml
+++ b/compiler-build-tools/pom.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>

+<?xml version="1.0" encoding="UTF-8"?>
 <!--
 
   Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,304 +16,309 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 
---><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

-  <modelVersion>4.0.0</modelVersion>

-

-  <parent>

-    <groupId>org.apache</groupId>

-    <artifactId>apache</artifactId>

-    <version>23</version>

-    <relativePath />

-  </parent>

-

-  <groupId>org.apache.royale.compiler</groupId>

-  <artifactId>compiler-build-tools</artifactId>

-  <version>1.2.1-SNAPSHOT</version>

-  <packaging>maven-plugin</packaging>

-

-  <name>Apache Royale: Build Tools</name>

-

-  <scm>

-    <connection>scm:git:https://gitbox.apache.org/repos/asf/royale-compiler.git</connection>

-    <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/royale-compiler.git</developerConnection>

-    <url>https://github.com/apache/royale-compiler</url>

-    <tag>HEAD</tag>

-  </scm>

-

-  <build>

-    <plugins>

-      <plugin>

-        <groupId>org.apache.maven.plugins</groupId>

-        <artifactId>maven-plugin-plugin</artifactId>

-        <version>3.6.0</version>

-        <configuration>

-          <goalPrefix>compiler-build-tools</goalPrefix>

-          <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>

-        </configuration>

-        <executions>

-          <execution>

-            <id>mojo-descriptor</id>

-            <goals>

-              <goal>descriptor</goal>

-            </goals>

-          </execution>

-          <execution>

-            <id>help-goal</id>

-            <goals>

-              <goal>helpmojo</goal>

-            </goals>

-          </execution>

-        </executions>

-      </plugin>

-      <plugin>

-        <groupId>org.apache.maven.plugins</groupId>

-        <artifactId>maven-javadoc-plugin</artifactId>

-      </plugin>

-      <!-- This plugin cleans up the jars for anything that might cause problems for reproducible builds -->

-      <plugin>

-        <groupId>io.github.zlika</groupId>

-        <artifactId>reproducible-build-maven-plugin</artifactId>

-        <version>0.11</version>

-        <executions>

-          <execution>

-            <goals>

-              <goal>strip-jar</goal>

-            </goals>

-          </execution>

-        </executions>

-      </plugin>

-    </plugins>

-    <pluginManagement>

-      <plugins>

-        <plugin>

-          <groupId>org.apache.maven.plugins</groupId>

-          <artifactId>maven-javadoc-plugin</artifactId>

-          <configuration>

-            <tags>

-              <tag>

-                <name>goal</name>

-                <placement>a</placement>

-                <head>Goal:</head>

-              </tag>

-              <tag>

-                <name>phase</name>

-                <placement>a</placement>

-                <head>Phase:</head>

-              </tag>

-              <tag>

-                <name>threadSafe</name>

-                <placement>a</placement>

-                <head>Thread Safe:</head>

-              </tag>

-              <tag>

-                <name>requiresDependencyResolution</name>

-                <placement>a</placement>

-                <head>Requires Dependency Resolution:</head>

-              </tag>

-              <tag>

-                <name>requiresProject</name>

-                <placement>a</placement>

-                <head>Requires Project:</head>

-              </tag>

-            </tags>

-          </configuration>

-        </plugin>

-        <plugin>

-          <groupId>org.apache.maven.plugins</groupId>

-          <artifactId>maven-scm-plugin</artifactId>

-        </plugin>

-        <plugin>

-          <groupId>org.apache.maven.plugins</groupId>

-          <artifactId>maven-resources-plugin</artifactId>

-        </plugin>

-        <plugin>

-          <groupId>org.apache.maven.plugins</groupId>

-          <artifactId>maven-assembly-plugin</artifactId>

-          <version>3.2.0</version>

-          <configuration>

-            <finalName>apache-royale-${project.artifactId}-${project.version}</finalName>

-          </configuration>

-        </plugin>

-      </plugins>

-    </pluginManagement>

-  </build>

-

-  <reporting>

-    <plugins>

-      <plugin>

-        <groupId>org.apache.maven.plugins</groupId>

-        <artifactId>maven-javadoc-plugin</artifactId>

-        <version>2.10.4</version>

-      </plugin>

-    </plugins>

-  </reporting>

-

-  <dependencies>

-    <dependency>

-      <groupId>com.google.guava</groupId>

-      <artifactId>guava</artifactId>

-      <version>25.1-jre</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.maven</groupId>

-      <artifactId>maven-core</artifactId>

-      <version>3.5.4</version>

-    </dependency>

-    <dependency>

-      <groupId>org.codehaus.plexus</groupId>

-      <artifactId>plexus-compiler-api</artifactId>

-      <version>2.2</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.commons</groupId>

-      <artifactId>commons-compress</artifactId>

-      <version>1.18</version>

-    </dependency>

-    <dependency>

-      <groupId>commons-io</groupId>

-      <artifactId>commons-io</artifactId>

-      <version>2.6</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.maven</groupId>

-      <artifactId>maven-plugin-api</artifactId>

-      <version>3.5.4</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.maven.plugin-tools</groupId>

-      <artifactId>maven-plugin-annotations</artifactId>

-      <version>3.1</version>

-    </dependency>

-    <dependency>

-      <groupId>org.codehaus.plexus</groupId>

-      <artifactId>plexus-utils</artifactId>

-      <version>3.0.3</version>

-    </dependency>

-  </dependencies>

-

-  <profiles>

-    <profile>

-      <id>apache-release</id>

-      <build>

-        <plugins>

-          <plugin>

-            <groupId>com.theoryinpractise</groupId>

-            <artifactId>reproducible-maven-plugin</artifactId>

-          </plugin>

-          <plugin>

-            <groupId>org.apache.maven.plugins</groupId>

-            <artifactId>maven-release-plugin</artifactId>

-            <configuration>

-              <preparationGoals>clean com.theoryinpractise:reproducible-maven-plugin:apply install</preparationGoals>

-              <completionGoals>com.theoryinpractise:reproducible-maven-plugin:clear</completionGoals>

-            </configuration>

-          </plugin>

+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache</groupId>
+    <artifactId>apache</artifactId>
+    <version>23</version>
+    <relativePath />
+  </parent>
+
+  <groupId>org.apache.royale.compiler</groupId>
+  <artifactId>compiler-build-tools</artifactId>
+  <version>1.2.2-SNAPSHOT</version>
+  <packaging>maven-plugin</packaging>
+
+  <name>Apache Royale: Build Tools</name>
+
+  <scm>
+    <connection>scm:git:https://gitbox.apache.org/repos/asf/royale-compiler.git</connection>
+    <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/royale-compiler.git</developerConnection>
+    <url>https://github.com/apache/royale-compiler</url>
+    <tag>HEAD</tag>
+  </scm>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-plugin-plugin</artifactId>
+        <version>3.6.0</version>
+        <configuration>
+          <goalPrefix>compiler-build-tools</goalPrefix>
+          <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
+        </configuration>
+        <executions>
+          <execution>
+            <id>mojo-descriptor</id>
+            <goals>
+              <goal>descriptor</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>help-goal</id>
+            <goals>
+              <goal>helpmojo</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+      </plugin>
+      <!-- This plugin cleans up the jars for anything that might cause problems for reproducible builds -->
+      <plugin>
+        <groupId>io.github.zlika</groupId>
+        <artifactId>reproducible-build-maven-plugin</artifactId>
+        <version>0.11</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>strip-jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-javadoc-plugin</artifactId>
+          <configuration>
+            <tags>
+              <tag>
+                <name>goal</name>
+                <placement>a</placement>
+                <head>Goal:</head>
+              </tag>
+              <tag>
+                <name>phase</name>
+                <placement>a</placement>
+                <head>Phase:</head>
+              </tag>
+              <tag>
+                <name>threadSafe</name>
+                <placement>a</placement>
+                <head>Thread Safe:</head>
+              </tag>
+              <tag>
+                <name>requiresDependencyResolution</name>
+                <placement>a</placement>
+                <head>Requires Dependency Resolution:</head>
+              </tag>
+              <tag>
+                <name>requiresProject</name>
+                <placement>a</placement>
+                <head>Requires Project:</head>
+              </tag>
+            </tags>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-scm-plugin</artifactId>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-resources-plugin</artifactId>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-javadoc-plugin</artifactId>
+          <version>3.2.0</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-assembly-plugin</artifactId>
+          <version>3.2.0</version>
+          <configuration>
+            <finalName>apache-royale-${project.artifactId}-${project.version}</finalName>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <version>2.10.4</version>
+      </plugin>
+    </plugins>
+  </reporting>
+
+  <dependencies>
+    <dependency>
+      <groupId>com.google.guava</groupId>
+      <artifactId>guava</artifactId>
+      <version>25.1-jre</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-core</artifactId>
+      <version>3.5.4</version>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-compiler-api</artifactId>
+      <version>2.2</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-compress</artifactId>
+      <version>1.18</version>
+    </dependency>
+    <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
+      <version>2.6</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+      <version>3.5.4</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.plugin-tools</groupId>
+      <artifactId>maven-plugin-annotations</artifactId>
+      <version>3.1</version>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+      <version>3.0.3</version>
+    </dependency>
+  </dependencies>
+
+  <profiles>
+    <profile>
+      <id>apache-release</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>com.theoryinpractise</groupId>
+            <artifactId>reproducible-maven-plugin</artifactId>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-release-plugin</artifactId>
+            <configuration>
+              <preparationGoals>clean com.theoryinpractise:reproducible-maven-plugin:apply install</preparationGoals>
+              <completionGoals>com.theoryinpractise:reproducible-maven-plugin:clear</completionGoals>
+            </configuration>
+          </plugin>
           <!--
             Create MD5 and SHA512 checksum files for the release artifacts.
-          -->

-          <plugin>

-            <groupId>net.nicoulaj.maven.plugins</groupId>

-            <artifactId>checksum-maven-plugin</artifactId>

-            <version>1.8</version>

-            <executions>

-              <execution>

-                <goals>

-                  <goal>files</goal>

-                </goals>

-              </execution>

-            </executions>

-            <configuration>

-              <algorithms>

-                <algorithm>SHA-512</algorithm>

-              </algorithms>

-              <fileSets>

-                <fileSet>

-                  <directory>${project.build.directory}</directory>

-                  <includes>

-                    <include>apache-royale-${project.artifactId}-${project.version}-source-release.zip</include>

-                  </includes>

-                </fileSet>

-              </fileSets>

-            </configuration>

-          </plugin>

-        </plugins>

-      </build>

-    </profile>

-    <profile>

-      <id>royale-release</id>

-      <properties>

-        <!-- Ensure the royale-release plugin is enabled when running release:perform -->

-        <release-profiles>apache-release</release-profiles>

-      </properties>

-

-      <!-- Redirect the deployment to a local directory -->

-      <!-- Note: using the 'altReleaseDeploymentRepository' and alike were ignored in the release:perform phase -->

-      <distributionManagement>

-        <repository>

-          <id>apache.releases.https</id>

-          <name>Apache Release Distribution Repository</name>

+          -->
+          <plugin>
+            <groupId>net.nicoulaj.maven.plugins</groupId>
+            <artifactId>checksum-maven-plugin</artifactId>
+            <version>1.8</version>
+            <executions>
+              <execution>
+                <goals>
+                  <goal>files</goal>
+                </goals>
+              </execution>
+            </executions>
+            <configuration>
+              <algorithms>
+                <algorithm>SHA-512</algorithm>
+              </algorithms>
+              <fileSets>
+                <fileSet>
+                  <directory>${project.build.directory}</directory>
+                  <includes>
+                    <include>apache-royale-${project.artifactId}-${project.version}-source-release.zip</include>
+                  </includes>
+                </fileSet>
+              </fileSets>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    <profile>
+      <id>royale-release</id>
+      <properties>
+        <!-- Ensure the royale-release plugin is enabled when running release:perform -->
+        <release-profiles>apache-release</release-profiles>
+      </properties>
+
+      <!-- Redirect the deployment to a local directory -->
+      <!-- Note: using the 'altReleaseDeploymentRepository' and alike were ignored in the release:perform phase -->
+      <distributionManagement>
+        <repository>
+          <id>apache.releases.https</id>
+          <name>Apache Release Distribution Repository</name>
           <!--
             'maven.multiModuleProjectDirectory' is a property introduced with maven 3.3.1 ...
             don't worry if your IDE is complaining.
             Also this will be set to the 'target/checkout' directory the output will be in
             'target/local-release-dir'.
-          -->

-          <url>file://${maven.multiModuleProjectDirectory}/../local-release-dir</url>

-        </repository>

-      </distributionManagement>

-

-      <build>

-        <plugins>

-          <!-- Generate the effective poms for this build -->

-          <plugin>

-            <groupId>org.apache.maven.plugins</groupId>

-            <artifactId>maven-help-plugin</artifactId>

-            <executions>

-              <execution>

-                <id>generate-effective-pom</id>

-                <phase>compile</phase>

-                <goals>

-                  <goal>effective-pom</goal>

-                </goals>

-                <configuration>

-                  <output>${project.build.directory}/effective.pom</output>

-                </configuration>

-              </execution>

-            </executions>

-          </plugin>

-        </plugins>

-        <pluginManagement>

-          <plugins>

-            <!-- We require the release manager to manually login an sign using his credentials -->

-            <plugin>

-              <groupId>org.apache.maven.plugins</groupId>

-              <artifactId>maven-gpg-plugin</artifactId>

-              <configuration>

-                <skip>true</skip>

-              </configuration>

-            </plugin>

-            <!-- We require the release manager to login and push the changes using his credentials -->

-            <plugin>

-              <groupId>org.apache.maven.plugins</groupId>

-              <artifactId>maven-release-plugin</artifactId>

-              <configuration>

-                <pushChanges>false</pushChanges>

-                <providerImplementations>

-                  <git>jgit</git>

-                </providerImplementations>

-              </configuration>

-              <dependencies>

-                <dependency>

-                  <groupId>org.apache.maven.scm</groupId>

-                  <artifactId>maven-scm-provider-jgit</artifactId>

-                  <version>1.11.3-SNAPSHOT</version>

-                </dependency>

-              </dependencies>

-            </plugin>

-          </plugins>

-        </pluginManagement>

-      </build>

-    </profile>

-  </profiles>

-

-<properties /></project>

+          -->
+          <url>file://${maven.multiModuleProjectDirectory}/../local-release-dir</url>
+        </repository>
+      </distributionManagement>
+
+      <build>
+        <plugins>
+          <!-- Generate the effective poms for this build -->
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-help-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>generate-effective-pom</id>
+                <phase>compile</phase>
+                <goals>
+                  <goal>effective-pom</goal>
+                </goals>
+                <configuration>
+                  <output>${project.build.directory}/effective.pom</output>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+        <pluginManagement>
+          <plugins>
+            <!-- We require the release manager to manually login an sign using his credentials -->
+            <plugin>
+              <groupId>org.apache.maven.plugins</groupId>
+              <artifactId>maven-gpg-plugin</artifactId>
+              <configuration>
+                <skip>true</skip>
+              </configuration>
+            </plugin>
+            <!-- We require the release manager to login and push the changes using his credentials -->
+            <plugin>
+              <groupId>org.apache.maven.plugins</groupId>
+              <artifactId>maven-release-plugin</artifactId>
+              <configuration>
+                <pushChanges>false</pushChanges>
+                <providerImplementations>
+                  <git>jgit</git>
+                </providerImplementations>
+              </configuration>
+              <dependencies>
+                <dependency>
+                  <groupId>org.apache.maven.scm</groupId>
+                  <artifactId>maven-scm-provider-jgit</artifactId>
+                  <version>1.11.3-SNAPSHOT</version>
+                </dependency>
+              </dependencies>
+            </plugin>
+          </plugins>
+        </pluginManagement>
+      </build>
+    </profile>
+  </profiles>
+
+<properties /></project>
diff --git a/compiler-build-tools/releasesteps.xml b/compiler-build-tools/releasesteps.xml
index f6869d7..9e1ac2e 100644
--- a/compiler-build-tools/releasesteps.xml
+++ b/compiler-build-tools/releasesteps.xml
@@ -280,7 +280,6 @@
             unless="release.version"/>
         <exec executable="${mvn}" failonerror="true" >
             <arg value="wagon:upload" />
-            <arg value="-X" />
             <arg value="-Dwagon.fromDir=${artifactfolder}/artifacts/archive/compiler-build-tools/target/local-release-dir" />
             <arg value="-Dwagon.url=https://repository.apache.org/service/local/staging/deploy/maven2" />
             <arg value="-Dwagon.serverId=apache.releases.https" />
diff --git a/compiler-build-tools/src/main/java/org/apache/royale/compiler/tools/annotate/OrderSwitches.java b/compiler-build-tools/src/main/java/org/apache/royale/compiler/tools/annotate/OrderSwitches.java
new file mode 100644
index 0000000..f99c287
--- /dev/null
+++ b/compiler-build-tools/src/main/java/org/apache/royale/compiler/tools/annotate/OrderSwitches.java
@@ -0,0 +1,260 @@
+/*
+ * 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.tools.annotate;
+
+import java.io.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Set;
+
+public class OrderSwitches
+{
+    public static void processFile(File file) throws AnnotateClass.AnnotateClassDeleteException, AnnotateClass.AnnotateClassRenameException {
+        if(!file.exists()) {
+            System.out.println("Missing file: " + file.getPath());
+            return;
+        }
+        try
+        {
+            // Prepare to read the file.
+            FileInputStream fileInputStream = new FileInputStream(file);
+            InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream);
+            BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
+
+            File tmpOutputFile = new File(file.getParentFile(), file.getName() + ".tmp");
+            FileOutputStream fileOutputStream = new FileOutputStream(tmpOutputFile);
+            PrintStream outputStream = new PrintStream(fileOutputStream);
+            try
+            {
+                // Read it line-by-line.
+                String line;
+                ArrayList<String> lines = new ArrayList<String>();
+                boolean inSwitch = false;
+                while ((line = bufferedReader.readLine()) != null)
+                {
+                    if (line.contains("The following code was generated by JFlex "))
+                    {
+                    	int c = line.indexOf(" on ");
+                    	if (c != -1)
+                    		line = line.substring(0, c) + " */";
+                    }
+                    if (line.contains("* on ") && line.contains("from the specification file"))
+                    	line = " * from the specification file";
+                    if (line.contains("<tt>") && line.contains("compiler/src/main/jflex"))
+                    {
+                    	int t = line.indexOf("<tt>");
+                    	int rc = line.indexOf("compiler/src/main/jflex");
+                    	line = line.substring(0, t + 4) + line.substring(rc);
+                    }
+                    // If the line starts with "switch", and the cases are numbers, make sure they are in order.
+                    if (line.contains("      switch (zzAction")) {
+                    	inSwitch = true;
+                        System.out.println("Ordering Switch in file: " + file.getPath());
+                    }
+                    if (inSwitch)
+                    {
+                    	lines.add(line);
+                        if (line.startsWith("      }")) {
+                        	orderSwitch(lines);
+                        	for (String orderedLine : lines)
+                        	{
+                        		outputStream.println(orderedLine);
+                        	}
+                        	inSwitch = false;
+                        }
+                    }
+                    else
+                    	outputStream.println(line);
+                }
+            }
+            finally
+            {
+                try {
+                    bufferedReader.close();
+                } catch(Exception e) {
+                    // Ignore.
+                }
+                try {
+                    outputStream.close();
+                } catch(Exception e) {
+                    // Ignore.
+                }
+                try {
+                    fileOutputStream.close();
+                } catch(Exception e) {
+                    // Ignore.
+                }
+                try {
+                    inputStreamReader.close();
+                } catch(Exception e) {
+                    // Ignore.
+                }
+                try {
+                    fileInputStream.close();
+                } catch(Exception e) {
+                    // Ignore.
+                }
+            }
+
+            // Remove the original file.
+            if(!file.delete()) {
+                // wait a bit then retry on Windows
+                if (file.exists())
+                {
+                    for (int i = 0; i < 6; i++)
+                    {
+                        Thread.sleep(500);
+                        System.gc();
+                        if (file.delete())
+                           break;
+                    }
+                    if (file.exists())
+                        throw new AnnotateClass.AnnotateClassDeleteException("Error deleting original file at: " + file.getPath());
+                }
+            }
+
+            // Rename the temp file to the name of the original file.
+            if(!tmpOutputFile.renameTo(file)) {
+                throw new AnnotateClass.AnnotateClassRenameException("Error renaming the temp file from: " + tmpOutputFile.getPath() +
+                        " to: " + file.getPath());
+            }
+        }
+        catch (Exception e)
+        {
+            e.printStackTrace();
+        }
+    }
+    
+    private static void orderSwitch(ArrayList<String> lines) {
+    	HashMap<String,List<String>> switchMap = new HashMap<String,List<String>>();
+    	ArrayList<String> defaultCase = new ArrayList<String>();
+    	ArrayList<String> breaks = new ArrayList<String>();
+    	String line0 = lines.get(0); // first line should be switch statement
+    	boolean inDefault = false;
+    	int n = lines.size();
+    	for (int i = 1; i < n; i++)
+    	{
+    		String line = lines.get(i);
+    		int c = line.indexOf(" case ");
+    		if (!inDefault && (c != -1))
+    		{
+    			String cayse = line.substring(c);
+    			if (line.contains("break;"))
+    			{
+    				// some cases just contain a break statement.
+    				// the are used to make sure the prior case
+    				// ends with a break without having to check
+    				// if the break statement would be reachable
+    				// due to return statements in the case.
+    				breaks.add(line);
+    				continue;
+    			}
+    			else
+    			{
+    				ArrayList<String> caseLines = new ArrayList<String>();
+    				for (int j = i + 1; j < n; j++)
+    				{
+    					line = lines.get(j);
+    					if (line.contains(" case "))
+    					{
+    						switchMap.put(cayse, caseLines);
+    						i = j - 1;
+    						break;
+    					}
+    					else if (line.contains("default:"))
+    					{
+    						switchMap.put(cayse, caseLines);
+    						inDefault = true;
+    						i = j;
+    						// assumes no break at end of default case
+    						defaultCase.add(line);
+    						break;    						
+    					}
+    					caseLines.add(line);
+    				}
+    			}
+    		}
+			else if (line.contains("default:"))
+			{
+				inDefault = true;
+				// assumes no break at end of default case
+				defaultCase.add(line);
+			}
+    		else if (inDefault)
+    			defaultCase.add(line);
+    	}
+    	Set<String> keys = switchMap.keySet();
+    	ArrayList<String> keyList = new ArrayList<String>();
+    	keyList.addAll(keys);
+    	Collections.sort(keyList);
+    	lines.clear();
+    	lines.add(line0);
+    	int breakIndex = 0;
+    	for (String key : keyList)
+    	{
+    		lines.add("       " + key);
+    		List<String> caseLines = switchMap.get(key);
+    		lines.addAll(caseLines);
+    		lines.add(breaks.get(breakIndex++));    		
+    	}
+    	boolean inSwitch = false;
+    	boolean sawDefault = false;
+    	ArrayList<String> switchLines = new ArrayList<String>();
+    	for (String defaultLine : defaultCase)
+    	{
+            // If the line starts with "switch", and the cases are numbers, make sure they are in order.
+            if (defaultLine.contains("switch (zzLexicalState)")) {
+            	inSwitch = true;
+                System.out.println("Ordering Switch in default: ");
+            }
+            if (inSwitch)
+            {
+            	switchLines.add(defaultLine);
+            	if (defaultLine.contains("default:"))
+            		sawDefault = true;
+                if (sawDefault && defaultLine.startsWith("            }")) {
+                	orderSwitch(switchLines);
+                	for (String orderedLine : switchLines)
+                	{
+                		lines.add(orderedLine);
+                	}
+                	inSwitch = false;
+                }
+            }
+            else
+            	lines.add(defaultLine);
+
+    	}
+    	
+    }
+    
+    public static void main(String[] args)
+    {
+        File f = new File(args[0]);
+        try {
+            processFile(f);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        
+    }
+}
diff --git a/compiler-build-tools/src/main/java/org/apache/royale/compiler/tools/annotate/OrderSwitchesMojo.java b/compiler-build-tools/src/main/java/org/apache/royale/compiler/tools/annotate/OrderSwitchesMojo.java
new file mode 100644
index 0000000..041ac33
--- /dev/null
+++ b/compiler-build-tools/src/main/java/org/apache/royale/compiler/tools/annotate/OrderSwitchesMojo.java
@@ -0,0 +1,74 @@
+/*
+ * 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.tools.annotate;
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.codehaus.plexus.compiler.util.scan.InclusionScanException;
+import org.codehaus.plexus.compiler.util.scan.SimpleSourceInclusionScanner;
+import org.codehaus.plexus.compiler.util.scan.mapping.SuffixMapping;
+
+import java.io.*;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * Goal which orders switch statement in JFlex output.
+ */
+@Mojo(name="order-jflex-switches",defaultPhase = LifecyclePhase.PROCESS_SOURCES)
+public class OrderSwitchesMojo
+    extends AbstractMojo
+{
+    @Parameter
+    protected Set<String> includes = new HashSet<String>();
+
+    @Parameter
+    protected Set<String> excludes = new HashSet<String>();
+
+    @Parameter(defaultValue="${project.build.directory}/generated-sources")
+    private File directory;
+    
+    public void execute()
+        throws MojoExecutionException
+    {
+        SuffixMapping mapping = new SuffixMapping("jflex", Collections.<String>emptySet());
+        SimpleSourceInclusionScanner scan = new SimpleSourceInclusionScanner(includes, excludes);
+        scan.addSourceMapping(mapping);
+
+        try {
+            Set<File> candidates = scan.getIncludedSources(directory, null);
+            for(File candidate : candidates) {
+                try {
+                    OrderSwitches.processFile(candidate);
+                } catch(AnnotateClass.AnnotateClassDeleteException e) {
+                    throw new MojoExecutionException(e.getMessage());
+                } catch(AnnotateClass.AnnotateClassRenameException e) {
+                    throw new MojoExecutionException(e.getMessage());
+                }
+            }
+        } catch (InclusionScanException e) {
+            throw new MojoExecutionException("Error scanning files to be processed.", e);
+        }
+    }
+}
diff --git a/compiler-common/pom.xml b/compiler-common/pom.xml
index b2d9e69..9b3ccc1 100644
--- a/compiler-common/pom.xml
+++ b/compiler-common/pom.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>

+<?xml version="1.0" encoding="UTF-8"?>
 <!--
 
   Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,57 +16,75 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 
---><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

-  <modelVersion>4.0.0</modelVersion>

-

-    <parent>

-        <groupId>org.apache.royale.compiler</groupId>

-        <artifactId>royale-compiler-parent</artifactId>

-        <version>0.9.7</version>

-    </parent>

-

-    <artifactId>compiler-common</artifactId>

-    <version>0.9.7</version>

-

-    <name>Apache Royale: Compiler: Compiler-Common</name>

-    <description>The Apache Royale Compiler Common classes</description>

-  

-  <dependencies>

-    <dependency>

-      <groupId>org.apache.flex</groupId>

-      <artifactId>flex-tool-api</artifactId>

-      <version>1.0.0</version>

-    </dependency>

-    <dependency>

-      <groupId>commons-io</groupId>

-      <artifactId>commons-io</artifactId>

-      <version>2.6</version>

-    </dependency>

-    <dependency>

-      <groupId>commons-cli</groupId>

-      <artifactId>commons-cli</artifactId>

-      <version>1.4</version>

-    </dependency>

-    <dependency>

-      <groupId>org.antlr</groupId>

-      <artifactId>antlr</artifactId>

-      <version>3.3</version>

-    </dependency>

-    <dependency>

-      <groupId>com.google.guava</groupId>

-      <artifactId>guava</artifactId>

-      <version>25.1-jre</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.maven.plugins</groupId>

-      <artifactId>maven-scm-plugin</artifactId>

-      <version>1.10.0</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.maven.plugins</groupId>

-      <artifactId>maven-resources-plugin</artifactId>

-      <version>3.1.0</version>

-    </dependency>

-  </dependencies>

-

-<properties><project.build.outputTimestamp>2020-05-07T15:02:12Z</project.build.outputTimestamp></properties></project>

+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.royale.compiler</groupId>
+        <artifactId>royale-compiler-parent</artifactId>
+        <version>0.9.8</version>
+    </parent>
+
+    <artifactId>compiler-common</artifactId>
+    <version>0.9.8</version>
+
+    <name>Apache Royale: Compiler: Compiler-Common</name>
+    <description>The Apache Royale Compiler Common classes</description>
+
+    <build>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-jar-plugin</artifactId>
+          <configuration>
+            <archive>
+              <manifestEntries>
+                <Sealed>false</Sealed>
+                <!-- These paths are all defined the way the layout will be in the distribution -->
+                <Class-Path>external/commons-cli.jar external/commons-io.jar external/guava.jar ..</Class-Path>
+              </manifestEntries>
+            </archive>
+          </configuration>
+        </plugin>
+      </plugins>
+    </build>
+  
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.flex</groupId>
+      <artifactId>flex-tool-api</artifactId>
+      <version>1.0.0</version>
+    </dependency>
+    <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
+      <version>2.6</version>
+    </dependency>
+    <dependency>
+      <groupId>commons-cli</groupId>
+      <artifactId>commons-cli</artifactId>
+      <version>1.4</version>
+    </dependency>
+    <dependency>
+      <groupId>org.antlr</groupId>
+      <artifactId>antlr</artifactId>
+      <version>3.3</version>
+    </dependency>
+    <dependency>
+      <groupId>com.google.guava</groupId>
+      <artifactId>guava</artifactId>
+      <version>25.1-jre</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.plugins</groupId>
+      <artifactId>maven-scm-plugin</artifactId>
+      <version>1.10.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.plugins</groupId>
+      <artifactId>maven-resources-plugin</artifactId>
+      <version>3.1.0</version>
+    </dependency>
+  </dependencies>
+
+<properties /></project>
diff --git a/compiler-externc/pom.xml b/compiler-externc/pom.xml
index 47cbf50..8e10da8 100644
--- a/compiler-externc/pom.xml
+++ b/compiler-externc/pom.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>

+<?xml version="1.0" encoding="UTF-8"?>
 <!--
 
   Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,253 +16,265 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 
---><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

-  <modelVersion>4.0.0</modelVersion>

-

-  <parent>

-    <groupId>org.apache.royale.compiler</groupId>

-    <artifactId>royale-compiler-parent</artifactId>

-    <version>0.9.7</version>

-  </parent>

-

-  <artifactId>compiler-externc</artifactId>

-  <version>0.9.7</version>

-

-  <name>Apache Royale: Compiler: Externc</name>

-  <description>The Apache Royale Compiler Externs Compiler</description>

-

-  <build>

-    <plugins>

-        <plugin>

-            <groupId>org.apache.royale.compiler</groupId>

-            <artifactId>compiler-build-tools</artifactId>

-            <version>${compiler-build-tools.version}</version>

-            <executions>

-                <execution>

-                    <id>unpack-closure-externs</id>

-                    <phase>validate</phase>

-                    <goals>

-                        <goal>unpack-resources</goal>

-                    </goals>

-                    <configuration>

-                        <resource>externs.zip</resource>

-                    </configuration>

-                </execution>

-            </executions>

+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.royale.compiler</groupId>
+    <artifactId>royale-compiler-parent</artifactId>
+    <version>0.9.8</version>
+  </parent>
+
+  <artifactId>compiler-externc</artifactId>
+  <version>0.9.8</version>
+
+  <name>Apache Royale: Compiler: Externc</name>
+  <description>The Apache Royale Compiler Externs Compiler</description>
+
+  <build>
+    <plugins>
+        <plugin>
+            <groupId>org.apache.royale.compiler</groupId>
+            <artifactId>compiler-build-tools</artifactId>
+            <version>${compiler-build-tools.version}</version>
+            <executions>
+                <execution>
+                    <id>unpack-closure-externs</id>
+                    <phase>validate</phase>
+                    <goals>
+                        <goal>unpack-resources</goal>
+                    </goals>
+                    <configuration>
+                        <resource>externs.zip</resource>
+                    </configuration>
+                </execution>
+            </executions>
             <!--
              Dependency to the closure compiler externs artifact so
              the "unpack-resources" goal can find the externs.zip
-             -->

-            <dependencies>

-                <dependency>

-                    <groupId>com.google.javascript</groupId>

-                    <artifactId>closure-compiler-externs</artifactId>

-                    <version>v20181210</version>

-                </dependency>

-            </dependencies>

-        </plugin>

-        <!-- Download JavaScript from GitHub -->

-        <plugin>

-            <groupId>com.googlecode.maven-download-plugin</groupId>

-            <artifactId>download-maven-plugin</artifactId>

-            <executions>

-                <execution>

-                    <id>get-svg</id>

-                    <phase>validate</phase>

-                    <goals>

-                        <goal>wget</goal>

-                    </goals>

-                    <configuration>

-                        <url>https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/contrib/externs/svg.js</url>

-                        <outputFileName>svg.js</outputFileName>

-                        <outputDirectory>${project.build.directory}/downloads</outputDirectory>

-                        <skipCache>true</skipCache>

-                    </configuration>

-                </execution>

-                <execution>

-                    <id>get-es3</id>

-                    <phase>validate</phase>

-                    <goals>

-                        <goal>wget</goal>

-                    </goals>

-                    <configuration>

-                        <url>https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/es3.js</url>

-                        <outputFileName>es3.js</outputFileName>

-                        <outputDirectory>${project.build.directory}/downloads</outputDirectory>

-                        <skipCache>true</skipCache>

-                        <overwrite>true</overwrite>

-                    </configuration>

-                </execution>

-                <execution>

-                    <id>get-es6</id>

-                    <phase>validate</phase>

-                    <goals>

-                        <goal>wget</goal>

-                    </goals>

-                    <configuration>

-                        <url>https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/es6.js</url>

-                        <outputFileName>es6.js</outputFileName>

-                        <outputDirectory>${project.build.directory}/downloads</outputDirectory>

-                        <skipCache>true</skipCache>

-                        <overwrite>true</overwrite>

-                    </configuration>

-                </execution>

-                <execution>

-                    <id>get-w3c_composition_event</id>

-                    <phase>validate</phase>

-                    <goals>

-                        <goal>wget</goal>

-                    </goals>

-                    <configuration>

-                        <url>https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/w3c_composition_event.js</url>

-                        <outputFileName>w3c_composition_event.js</outputFileName>

-                        <outputDirectory>${project.build.directory}/downloads/browser</outputDirectory>

-                        <skipCache>true</skipCache>

-                        <overwrite>true</overwrite>

-                    </configuration>

-                </execution>

-                <execution>

-                    <id>get-w3c_css</id>

-                    <phase>validate</phase>

-                    <goals>

-                        <goal>wget</goal>

-                    </goals>

-                    <configuration>

-                        <url>https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/w3c_css.js</url>

-                        <outputFileName>w3c_css.js</outputFileName>

-                        <outputDirectory>${project.build.directory}/downloads/browser</outputDirectory>

-                        <skipCache>true</skipCache>

-                        <overwrite>true</overwrite>

-                    </configuration>

-                </execution>

-                <execution>

-                    <id>get-gecko_dom</id>

-                    <phase>validate</phase>

-                    <goals>

-                        <goal>wget</goal>

-                    </goals>

-                    <configuration>

-                        <url>https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/gecko_dom.js</url>

-                        <outputFileName>gecko_dom.js</outputFileName>

-                        <outputDirectory>${project.build.directory}/downloads/browser</outputDirectory>

-                        <skipCache>true</skipCache>

-                        <overwrite>true</overwrite>

-                    </configuration>

-                </execution>

-                <execution>

-                    <id>get-w3c_dom2</id>

-                    <phase>validate</phase>

-                    <goals>

-                        <goal>wget</goal>

-                    </goals>

-                    <configuration>

-                        <url>https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/w3c_dom2.js</url>

-                        <outputFileName>w3c_dom2.js</outputFileName>

-                        <outputDirectory>${project.build.directory}/downloads/browser</outputDirectory>

-                        <skipCache>true</skipCache>

-                        <overwrite>true</overwrite>

-                    </configuration>

-                </execution>

-                <execution>

-                    <id>get-html5</id>

-                    <phase>validate</phase>

-                    <goals>

-                        <goal>wget</goal>

-                    </goals>

-                    <configuration>

-                        <url>https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/html5.js</url>

-                        <outputFileName>html5.js</outputFileName>

-                        <outputDirectory>${project.build.directory}/downloads/browser</outputDirectory>

-                        <skipCache>true</skipCache>

-                        <overwrite>true</overwrite>

-                    </configuration>

-                </execution>

-            </executions>

-        </plugin>

-        

-        <!-- Make the surefire execute all unit-tests -->

-        <plugin>

-            <groupId>org.apache.maven.plugins</groupId>

-            <artifactId>maven-surefire-plugin</artifactId>

-            <configuration>

-                <includes>

-                    <include>org/**/TestExternES3.java</include>

-                    <include>org/**/TestExternChrome.java</include>

-                    <include>org/**/TestExternJSMissing.java</include>

-                    <include>org/**/TestAnnotationEnum.java</include>

-                    <include>org/**/TestCollectImports.java</include>

-                    <include>org/**/TestConstructor.java</include>

-                    <include>org/**/TestPackageNamespace.java</include>

-                    <include>org/**/TestReferenceModel.java</include>

-                    <include>org/**/TestTypeTypedefs.java</include>

-                    <include>org/**/TestTypeInheritance.java</include>

-                </includes>

-                <excludes>

-                </excludes>

-            </configuration>

-        </plugin>

-        

-        <plugin>

-            <groupId>org.apache.maven.plugins</groupId>

-            <artifactId>maven-failsafe-plugin</artifactId>

-            <configuration>

-                <includes>

-                    <include>org/**/TestExternES3.java</include>

-                    <include>org/**/TestExternChrome.java</include>

-                    <include>org/**/TestExternJSMissing.java</include>

-                    <include>org/**/TestAnnotationEnum.java</include>

-                    <include>org/**/TestCollectImports.java</include>

-                    <include>org/**/TestConstructor.java</include>

-                    <include>org/**/TestPackageNamespace.java</include>

-                    <include>org/**/TestReferenceModel.java</include>

-                    <include>org/**/TestTypeTypedefs.java</include>

-                    <include>org/**/TestTypeInheritance.java</include>

-                </includes>

-                <excludes>

-                </excludes>

-            </configuration>

-        </plugin>

-        

-        <plugin>

-            <groupId>org.apache.maven.plugins</groupId>

-            <artifactId>maven-jar-plugin</artifactId>

-            <executions>

-                <execution>

-                    <goals>

-                        <goal>test-jar</goal>

-                    </goals>

-                </execution>

-            </executions>

-        </plugin>

-    </plugins>

-  </build>

-

-

-  <dependencies>

-    <dependency>

-      <groupId>org.apache.royale.compiler</groupId>

-      <artifactId>compiler-common</artifactId>

-      <version>0.9.7</version>

-    </dependency>

-    <dependency>

-      <groupId>com.google.javascript</groupId>

-      <artifactId>closure-compiler</artifactId>

-      <version>v20181210</version>

-    </dependency>

-

-    <dependency>

-      <groupId>org.apache.royale.compiler</groupId>

-      <artifactId>compiler-test-utils</artifactId>

-      <version>0.9.7</version>

-      <scope>test</scope>

-    </dependency>

-    <dependency>

-      <groupId>junit</groupId>

-      <artifactId>junit</artifactId>

-      <version>4.10</version>

-      <scope>test</scope>

-    </dependency>

-

-  </dependencies>

-

-<properties><project.build.outputTimestamp>2020-05-07T15:02:12Z</project.build.outputTimestamp></properties></project>

+             -->
+            <dependencies>
+                <dependency>
+                    <groupId>com.google.javascript</groupId>
+                    <artifactId>closure-compiler-externs</artifactId>
+                    <version>v20181210</version>
+                </dependency>
+            </dependencies>
+        </plugin>
+        <!-- Download JavaScript from GitHub -->
+        <plugin>
+            <groupId>com.googlecode.maven-download-plugin</groupId>
+            <artifactId>download-maven-plugin</artifactId>
+            <executions>
+                <execution>
+                    <id>get-svg</id>
+                    <phase>validate</phase>
+                    <goals>
+                        <goal>wget</goal>
+                    </goals>
+                    <configuration>
+                        <url>https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/contrib/externs/svg.js</url>
+                        <outputFileName>svg.js</outputFileName>
+                        <outputDirectory>${project.build.directory}/downloads</outputDirectory>
+                        <skipCache>true</skipCache>
+                    </configuration>
+                </execution>
+                <execution>
+                    <id>get-es3</id>
+                    <phase>validate</phase>
+                    <goals>
+                        <goal>wget</goal>
+                    </goals>
+                    <configuration>
+                        <url>https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/es3.js</url>
+                        <outputFileName>es3.js</outputFileName>
+                        <outputDirectory>${project.build.directory}/downloads</outputDirectory>
+                        <skipCache>true</skipCache>
+                        <overwrite>true</overwrite>
+                    </configuration>
+                </execution>
+                <execution>
+                    <id>get-es6</id>
+                    <phase>validate</phase>
+                    <goals>
+                        <goal>wget</goal>
+                    </goals>
+                    <configuration>
+                        <url>https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/es6.js</url>
+                        <outputFileName>es6.js</outputFileName>
+                        <outputDirectory>${project.build.directory}/downloads</outputDirectory>
+                        <skipCache>true</skipCache>
+                        <overwrite>true</overwrite>
+                    </configuration>
+                </execution>
+                <execution>
+                    <id>get-w3c_composition_event</id>
+                    <phase>validate</phase>
+                    <goals>
+                        <goal>wget</goal>
+                    </goals>
+                    <configuration>
+                        <url>https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/w3c_composition_event.js</url>
+                        <outputFileName>w3c_composition_event.js</outputFileName>
+                        <outputDirectory>${project.build.directory}/downloads/browser</outputDirectory>
+                        <skipCache>true</skipCache>
+                        <overwrite>true</overwrite>
+                    </configuration>
+                </execution>
+                <execution>
+                    <id>get-w3c_css</id>
+                    <phase>validate</phase>
+                    <goals>
+                        <goal>wget</goal>
+                    </goals>
+                    <configuration>
+                        <url>https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/w3c_css.js</url>
+                        <outputFileName>w3c_css.js</outputFileName>
+                        <outputDirectory>${project.build.directory}/downloads/browser</outputDirectory>
+                        <skipCache>true</skipCache>
+                        <overwrite>true</overwrite>
+                    </configuration>
+                </execution>
+                <execution>
+                    <id>get-gecko_dom</id>
+                    <phase>validate</phase>
+                    <goals>
+                        <goal>wget</goal>
+                    </goals>
+                    <configuration>
+                        <url>https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/gecko_dom.js</url>
+                        <outputFileName>gecko_dom.js</outputFileName>
+                        <outputDirectory>${project.build.directory}/downloads/browser</outputDirectory>
+                        <skipCache>true</skipCache>
+                        <overwrite>true</overwrite>
+                    </configuration>
+                </execution>
+                <execution>
+                    <id>get-w3c_dom2</id>
+                    <phase>validate</phase>
+                    <goals>
+                        <goal>wget</goal>
+                    </goals>
+                    <configuration>
+                        <url>https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/w3c_dom2.js</url>
+                        <outputFileName>w3c_dom2.js</outputFileName>
+                        <outputDirectory>${project.build.directory}/downloads/browser</outputDirectory>
+                        <skipCache>true</skipCache>
+                        <overwrite>true</overwrite>
+                    </configuration>
+                </execution>
+                <execution>
+                    <id>get-html5</id>
+                    <phase>validate</phase>
+                    <goals>
+                        <goal>wget</goal>
+                    </goals>
+                    <configuration>
+                        <url>https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/html5.js</url>
+                        <outputFileName>html5.js</outputFileName>
+                        <outputDirectory>${project.build.directory}/downloads/browser</outputDirectory>
+                        <skipCache>true</skipCache>
+                        <overwrite>true</overwrite>
+                    </configuration>
+                </execution>
+            </executions>
+        </plugin>
+        
+        <!-- Make the surefire execute all unit-tests -->
+        <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-surefire-plugin</artifactId>
+            <configuration>
+                <includes>
+                    <include>org/**/TestExternES3.java</include>
+                    <include>org/**/TestExternChrome.java</include>
+                    <include>org/**/TestExternJSMissing.java</include>
+                    <include>org/**/TestAnnotationEnum.java</include>
+                    <include>org/**/TestCollectImports.java</include>
+                    <include>org/**/TestConstructor.java</include>
+                    <include>org/**/TestPackageNamespace.java</include>
+                    <include>org/**/TestReferenceModel.java</include>
+                    <include>org/**/TestTypeTypedefs.java</include>
+                    <include>org/**/TestTypeInheritance.java</include>
+                </includes>
+                <excludes>
+                </excludes>
+            </configuration>
+        </plugin>
+        
+        <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-failsafe-plugin</artifactId>
+            <configuration>
+                <includes>
+                    <include>org/**/TestExternES3.java</include>
+                    <include>org/**/TestExternChrome.java</include>
+                    <include>org/**/TestExternJSMissing.java</include>
+                    <include>org/**/TestAnnotationEnum.java</include>
+                    <include>org/**/TestCollectImports.java</include>
+                    <include>org/**/TestConstructor.java</include>
+                    <include>org/**/TestPackageNamespace.java</include>
+                    <include>org/**/TestReferenceModel.java</include>
+                    <include>org/**/TestTypeTypedefs.java</include>
+                    <include>org/**/TestTypeInheritance.java</include>
+                </includes>
+                <excludes>
+                </excludes>
+            </configuration>
+        </plugin>
+        
+        <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-jar-plugin</artifactId>
+            <executions>
+                <execution>
+                    <id>default-jar</id>
+                    <configuration>
+                        <archive>
+                            <manifestEntries>
+                                <!-- These paths are all defined the way the layout will be in the distribution -->
+                                <Class-Path>../../compiler/lib/external/commons-cli.jar ../../lib/external/commons-cli.jar ../../compiler/lib/external/commons-io.jar ../../lib/external/commons-io.jar ../../compiler/lib/external/guava.jar ../../lib/external/guava.jar ../../compiler/lib/external/flex-tool-api.jar ../../lib/external/flex-tool-api.jar google/closure-compiler/compiler.jar ../../compiler/lib/compiler-common.jar ../../lib/compiler-common.jar ..</Class-Path>
+                            </manifestEntries>
+                        </archive>
+                    </configuration>
+                </execution>
+                <execution>
+                    <id>default-test-jar</id>
+                    <goals>
+                        <goal>test-jar</goal>
+                    </goals>
+                </execution>
+            </executions>
+        </plugin>
+    </plugins>
+  </build>
+
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.royale.compiler</groupId>
+      <artifactId>compiler-common</artifactId>
+      <version>0.9.8</version>
+    </dependency>
+    <dependency>
+      <groupId>com.google.javascript</groupId>
+      <artifactId>closure-compiler</artifactId>
+      <version>v20181210</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.royale.compiler</groupId>
+      <artifactId>compiler-test-utils</artifactId>
+      <version>0.9.8</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.10</version>
+      <scope>test</scope>
+    </dependency>
+
+  </dependencies>
+
+<properties /></project>
diff --git a/compiler-jburg-types/pom.xml b/compiler-jburg-types/pom.xml
index ea230e0..90b23a2 100644
--- a/compiler-jburg-types/pom.xml
+++ b/compiler-jburg-types/pom.xml
@@ -48,6 +48,7 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-javadoc-plugin</artifactId>
+        <version>3.2.0</version>
         <configuration>
           <tags>
             <tag>
diff --git a/compiler-jx/build.xml b/compiler-jx/build.xml
index 3bfa292..a41f794 100644
--- a/compiler-jx/build.xml
+++ b/compiler-jx/build.xml
@@ -76,6 +76,7 @@
             <file name="guava.jar" />
 			<file name="flex-tool-api.jar" />
             <file name="externc.jar" />
+            <file name="compiler-playerglobalc.jar" />
         </filelist>
 		<filelist dir="${lib}/google/closure-compiler">
             <file name="compiler.jar" />
diff --git a/compiler-jx/pom.xml b/compiler-jx/pom.xml
index 4f720f9..9f33b3e 100644
--- a/compiler-jx/pom.xml
+++ b/compiler-jx/pom.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>

+<?xml version="1.0" encoding="UTF-8"?>
 <!--
 
   Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,227 +16,232 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 
---><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

-  <modelVersion>4.0.0</modelVersion>

-

-  <parent>

-    <groupId>org.apache.royale.compiler</groupId>

-    <artifactId>royale-compiler-parent</artifactId>

-    <version>0.9.7</version>

-  </parent>

-

-  <artifactId>compiler-jx</artifactId>

-  <version>0.9.7</version>

-

-  <name>Apache Royale: Compiler: Compiler-JX</name>

-

-  <build>

-    <plugins>

-      <plugin>

-        <groupId>org.apache.maven.plugins</groupId>

-        <artifactId>maven-jar-plugin</artifactId>

-        <configuration>

-          <archive>

-            <manifestEntries>

-              <Sealed>false</Sealed>

-              <Class-Path>commons-io.jar guava.jar ../../lib/external/antlr.jar ../../compiler/lib/external/antlr.jar ../../lib/external/commons-lang-2.6.jar ../../compiler/lib/external/commons-lang-2.6.jar google/closure-compiler/compiler.jar ../../compiler/lib/compiler.jar ../../lib/compiler.jar  ../../compiler/lib/compiler-common.jar ../../lib/compiler-common.jar</Class-Path>

-              <!-- google-closure-library-0.0-20170809-b9c14c6b.jar google-closure-library-third-party-0.0-20170809-b9c14c6b.jar external/closure-compiler-v20181210.jar -->

-            </manifestEntries>

-          </archive>

-        </configuration>

-      </plugin>

-

-      <plugin>

-        <groupId>org.apache.maven.plugins</groupId>

-        <artifactId>maven-resources-plugin</artifactId>

-        <executions>

-          <execution>

-            <id>copy-externc-resources</id>

-            <phase>process-test-resources</phase>

-            <goals>

-              <goal>copy-resources</goal>

-            </goals>

-          <configuration>

-          <outputDirectory>${basedir}/../compiler-externc/target</outputDirectory>

-            <resources>

-              <resource>

-                <directory>${basedir}/../compiler-externc/src/test/config</directory>

-              </resource>

-            </resources>

-          </configuration>

-        </execution>

-        <execution>

-          <id>copy-custom-resources</id>

-          <phase>process-test-resources</phase>

-          <goals>

-            <goal>copy-resources</goal>

-          </goals>

-          <configuration>

-            <outputDirectory>${basedir}/target</outputDirectory>

-            <resources>

-              <resource>

-                <directory>${basedir}/src/test/config</directory>

-              </resource>

-            </resources>

-          </configuration>

-        </execution>

-      </executions>

-    </plugin>

-      <!-- Make the surefire execute all unit-tests -->

-      <plugin>

-        <groupId>org.apache.maven.plugins</groupId>

-        <artifactId>maven-surefire-plugin</artifactId>

-        <configuration>

-          <includes>

-            <include>org/**/Test*.java</include>

-          </includes>

-          <excludes>

-            <exclude>**/TestRoyaleFile.java</exclude>

-            <exclude>**/TestRoyaleMXML*.java</exclude>

-            <exclude>**/TestSourceMapMXML*.java</exclude>

-            <exclude>**/TestMXML*.java</exclude>

-            <exclude>**/TestRoyaleClass.java</exclude>

-            <exclude>**/TestTypedefsCompile.java</exclude>

-          </excludes>

-        </configuration>

-      </plugin>

-

-      <plugin>

-        <groupId>org.apache.maven.plugins</groupId>

-        <artifactId>maven-failsafe-plugin</artifactId>

-        <configuration>

-          <includes>

-            <include>**/TestMXML*.java</include>

-          </includes>

-          <excludes>

-            <exclude>**/TestTypedefsCompile.java</exclude>

-          </excludes>

-        </configuration>

-      </plugin>

-    

-      <plugin>

-        <groupId>org.codehaus.mojo</groupId>

-        <artifactId>exec-maven-plugin</artifactId>

-        <executions>

-          <execution>

-              <id>generate-test-js-typedefs</id>

-              <phase>test-compile</phase>

-              <goals>

-                  <goal>exec</goal>

-              </goals>

-              <configuration>

-                  <executable>java</executable>

-                  <arguments>

-                      <argument>-classpath</argument>

-                      <classpath />

-                      <arguments>org.apache.royale.compiler.clients.EXTERNC</arguments>

-                      <argument>-load-config+=../compiler-externc/src/test/config/externc-config.xml</argument>

-                  </arguments>

-              </configuration>

-          </execution>

-          <execution>

-              <id>generate-test-js-swc</id>

-              <phase>test-compile</phase>

-              <goals>

-                  <goal>exec</goal>

-              </goals>

-              <configuration>

-                  <executable>java</executable>

-                  <arguments>

-                      <argument>-classpath</argument>

-                      <classpath />

-                      <arguments>org.apache.royale.compiler.clients.COMPJSC</arguments>

-                      <argument>-targets=SWF</argument>

-                      <argument>-load-config+=../compiler-externc/target/compile-as-config.xml</argument>

-                      <argument>-output=../compiler-externc/target/js.swc</argument>

-                  </arguments>

-              </configuration>

-          </execution>

-          <execution>

-              <id>generate-test-custom-swc</id>

-              <phase>test-compile</phase>

-              <goals>

-                  <goal>exec</goal>

-              </goals>

-              <configuration>

-                  <executable>java</executable>

-                  <arguments>

-                      <argument>-classpath</argument>

-                      <classpath />

-                      <arguments>org.apache.royale.compiler.clients.COMPJSC</arguments>

-                      <argument>-load-config+=target/compile-js-config.xml</argument>

-                      <argument>-output=target/custom.swc</argument>

-                  </arguments>

-              </configuration>

-          </execution>

-        </executions>

-      </plugin>

-    </plugins>

-  </build>

-

-  <dependencies>

-    <dependency>

-      <groupId>org.apache.royale.compiler</groupId>

-      <artifactId>compiler-common</artifactId>

-      <version>0.9.7</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.royale.compiler</groupId>

-      <artifactId>compiler-externc</artifactId>

-      <version>0.9.7</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.royale.compiler</groupId>

-      <artifactId>compiler</artifactId>

-      <version>0.9.7</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.commons</groupId>

-      <artifactId>commons-compress</artifactId>

-      <version>1.11</version>

-    </dependency>

-    <dependency>

-      <groupId>commons-lang</groupId>

-      <artifactId>commons-lang</artifactId>

-      <version>2.6</version>

-    </dependency>

-

-    <dependency>

-      <groupId>args4j</groupId>

-      <artifactId>args4j</artifactId>

-      <version>2.33</version>

-    </dependency>

-    <dependency>

-      <groupId>com.google.javascript</groupId>

-      <artifactId>closure-compiler</artifactId>

-      <version>v20181210</version>

-    </dependency>

-    <dependency>

-      <groupId>org.clojure</groupId>

-      <artifactId>google-closure-library</artifactId>

-      <version>0.0-20170809-b9c14c6b</version>

-    </dependency>

-

-    <dependency>

-      <groupId>org.apache.royale.compiler</groupId>

-      <artifactId>compiler-test-utils</artifactId>

-      <version>0.9.7</version>

-      <scope>test</scope>

-    </dependency>

-    <dependency>

-      <groupId>junit</groupId>

-      <artifactId>junit</artifactId>

-      <version>4.10</version>

-      <scope>test</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.royale.compiler</groupId>

-      <artifactId>compiler-externc</artifactId>

-      <version>0.9.7</version>

-      <type>test-jar</type>

-      <scope>test</scope>

-    </dependency>

-    

-  </dependencies>

-

-<properties><project.build.outputTimestamp>2020-05-07T15:02:12Z</project.build.outputTimestamp></properties></project>

+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.royale.compiler</groupId>
+    <artifactId>royale-compiler-parent</artifactId>
+    <version>0.9.8</version>
+  </parent>
+
+  <artifactId>compiler-jx</artifactId>
+  <version>0.9.8</version>
+
+  <name>Apache Royale: Compiler: Compiler-JX</name>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifestEntries>
+              <Sealed>false</Sealed>
+              <!-- These paths are all defined the way the layout will be in the distribution -->
+              <Class-Path>commons-io.jar guava.jar ../../lib/external/antlr.jar  ../../lib/external/antlr-runtime.jar ../../lib/external/commons-lang.jar ../../lib/external/closure-compiler.jar ../../lib/compiler.jar ../../lib/compiler-common.jar</Class-Path>
+            </manifestEntries>
+          </archive>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-resources-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>copy-externc-resources</id>
+            <phase>process-test-resources</phase>
+            <goals>
+              <goal>copy-resources</goal>
+            </goals>
+          <configuration>
+          <outputDirectory>${basedir}/../compiler-externc/target</outputDirectory>
+            <resources>
+              <resource>
+                <directory>${basedir}/../compiler-externc/src/test/config</directory>
+              </resource>
+            </resources>
+          </configuration>
+        </execution>
+        <execution>
+          <id>copy-custom-resources</id>
+          <phase>process-test-resources</phase>
+          <goals>
+            <goal>copy-resources</goal>
+          </goals>
+          <configuration>
+            <outputDirectory>${basedir}/target</outputDirectory>
+            <resources>
+              <resource>
+                <directory>${basedir}/src/test/config</directory>
+              </resource>
+            </resources>
+          </configuration>
+        </execution>
+      </executions>
+    </plugin>
+      <!-- Make the surefire execute all unit-tests -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <includes>
+            <include>org/**/Test*.java</include>
+          </includes>
+          <excludes>
+            <exclude>**/TestRoyaleFile.java</exclude>
+            <exclude>**/TestRoyaleMXML*.java</exclude>
+            <exclude>**/TestSourceMapMXML*.java</exclude>
+            <exclude>**/TestMXML*.java</exclude>
+            <exclude>**/TestRoyaleClass.java</exclude>
+            <exclude>**/TestTypedefsCompile.java</exclude>
+          </excludes>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-failsafe-plugin</artifactId>
+        <configuration>
+          <includes>
+            <include>**/TestMXML*.java</include>
+          </includes>
+          <excludes>
+            <exclude>**/TestTypedefsCompile.java</exclude>
+          </excludes>
+        </configuration>
+      </plugin>
+    
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>exec-maven-plugin</artifactId>
+        <executions>
+          <execution>
+              <id>generate-test-js-typedefs</id>
+              <phase>test-compile</phase>
+              <goals>
+                  <goal>exec</goal>
+              </goals>
+              <configuration>
+                  <executable>java</executable>
+                  <arguments>
+                      <argument>-classpath</argument>
+                      <classpath />
+                      <arguments>org.apache.royale.compiler.clients.EXTERNC</arguments>
+                      <argument>-load-config+=../compiler-externc/src/test/config/externc-config.xml</argument>
+                  </arguments>
+              </configuration>
+          </execution>
+          <execution>
+              <id>generate-test-js-swc</id>
+              <phase>test-compile</phase>
+              <goals>
+                  <goal>exec</goal>
+              </goals>
+              <configuration>
+                  <executable>java</executable>
+                  <arguments>
+                      <argument>-classpath</argument>
+                      <classpath />
+                      <arguments>org.apache.royale.compiler.clients.COMPJSC</arguments>
+                      <argument>-targets=SWF</argument>
+                      <argument>-load-config+=../compiler-externc/target/compile-as-config.xml</argument>
+                      <argument>-output=../compiler-externc/target/js.swc</argument>
+                  </arguments>
+              </configuration>
+          </execution>
+          <execution>
+              <id>generate-test-custom-swc</id>
+              <phase>test-compile</phase>
+              <goals>
+                  <goal>exec</goal>
+              </goals>
+              <configuration>
+                  <executable>java</executable>
+                  <arguments>
+                      <argument>-classpath</argument>
+                      <classpath />
+                      <arguments>org.apache.royale.compiler.clients.COMPJSC</arguments>
+                      <argument>-load-config+=target/compile-js-config.xml</argument>
+                      <argument>-output=target/custom.swc</argument>
+                  </arguments>
+              </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.royale.compiler</groupId>
+      <artifactId>compiler-common</artifactId>
+      <version>0.9.8</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.compiler</groupId>
+      <artifactId>compiler-externc</artifactId>
+      <version>0.9.8</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.compiler</groupId>
+      <artifactId>compiler-playerglobalc</artifactId>
+      <version>0.9.8</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.compiler</groupId>
+      <artifactId>compiler</artifactId>
+      <version>0.9.8</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-compress</artifactId>
+      <version>1.11</version>
+    </dependency>
+    <dependency>
+      <groupId>commons-lang</groupId>
+      <artifactId>commons-lang</artifactId>
+      <version>2.6</version>
+    </dependency>
+
+    <dependency>
+      <groupId>args4j</groupId>
+      <artifactId>args4j</artifactId>
+      <version>2.33</version>
+    </dependency>
+    <dependency>
+      <groupId>com.google.javascript</groupId>
+      <artifactId>closure-compiler</artifactId>
+      <version>v20181210</version>
+    </dependency>
+    <dependency>
+      <groupId>org.clojure</groupId>
+      <artifactId>google-closure-library</artifactId>
+      <version>0.0-20170809-b9c14c6b</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.royale.compiler</groupId>
+      <artifactId>compiler-test-utils</artifactId>
+      <version>0.9.8</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.10</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.compiler</groupId>
+      <artifactId>compiler-externc</artifactId>
+      <version>0.9.8</version>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+    
+  </dependencies>
+
+<properties /></project>
diff --git a/compiler-jx/src/main/java/com/google/javascript/jscomp/FindRoyaleMXMLPropertyNamesToKeep.java b/compiler-jx/src/main/java/com/google/javascript/jscomp/FindRoyaleMXMLPropertyNamesToKeep.java
new file mode 100644
index 0000000..e940f8f
--- /dev/null
+++ b/compiler-jx/src/main/java/com/google/javascript/jscomp/FindRoyaleMXMLPropertyNamesToKeep.java
@@ -0,0 +1,386 @@
+/*
+ * 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.jscomp.NodeTraversal.AbstractPostOrderCallback;
+import com.google.javascript.rhino.Node;
+
+import org.apache.royale.compiler.mxml.IMXMLLanguageConstants;
+
+public class FindRoyaleMXMLPropertyNamesToKeep extends AbstractPostOrderCallback {
+
+	private final AbstractCompiler compiler;
+	private Set<String> propertyNamesToKeep;
+
+	public FindRoyaleMXMLPropertyNamesToKeep(AbstractCompiler compiler) {
+	  this.compiler = compiler;
+	}
+
+	public void process(Node externs, Node root, Set<String> propertyNamesToKeep) {
+		this.propertyNamesToKeep = propertyNamesToKeep;
+		NodeTraversal.traverse(compiler, root, this);
+	}
+
+	@Override
+	public void visit(NodeTraversal t, Node n, Node parent) {
+		checkForGenerateMXMLAttributes(t, n, parent);
+		checkForMXMLDescriptor(t, n, parent);
+		checkForBindings(t, n, parent);
+	}
+
+	private void checkForMXMLDescriptor(NodeTraversal t, Node n, Node parent) {
+		if(!n.isArrayLit()) {
+			return;
+		}
+
+		if(parent == null || !parent.isName()) {
+			return;
+		}
+
+		if(!"mxmldd".equals(parent.getQualifiedName())) {
+			return;
+		}
+
+		Node mxmlDescriptorNode = null;
+		if(parent.getGrandparent() != null
+				&& parent.getGrandparent().getGrandparent() != null
+				&& parent.getGrandparent().getGrandparent().getGrandparent() != null) {
+			mxmlDescriptorNode = parent.getGrandparent().getGrandparent().getGrandparent().getGrandparent();
+		}
+		if(mxmlDescriptorNode == null || !mxmlDescriptorNode.isStringKey() || mxmlDescriptorNode.getChildCount() == 0) {
+			return;
+		}
+		if(!"MXMLDescriptor".equals(mxmlDescriptorNode.getString())) {
+			return;
+		}
+		Node descriptorParent = mxmlDescriptorNode.getParent();
+		if(descriptorParent == null || !descriptorParent.isObjectLit()) {
+			return;
+		}
+		Node descriptorGP = mxmlDescriptorNode.getGrandparent();
+		if(descriptorGP == null) {
+			return;
+		}
+		if(descriptorGP.getIndexOfChild(descriptorParent) != 2) {
+			return;
+		}
+		Node prototype = descriptorGP.getChildBefore(descriptorParent);
+		String qualifiedName = prototype.getQualifiedName();
+		if(!qualifiedName.endsWith(".prototype")) {
+			return;
+		}
+		qualifiedName = qualifiedName.substring(0, qualifiedName.length() - 10);
+		Node defineProps = descriptorGP.getChildBefore(prototype);
+		if(!"Object.defineProperties".equals(defineProps.getQualifiedName())) {
+			return;
+		}
+		traverseMXMLAttributes(n, null);
+	}
+
+	private void checkForGenerateMXMLAttributes(NodeTraversal t, Node n, Node parent) {
+		if(!n.isGetProp()) {
+			return;
+		}
+		if(parent == null || !parent.isCall()) {
+			return;
+		}
+		if(!"this.generateMXMLAttributes".equals(n.getQualifiedName())) {
+			return;
+		}
+		if(parent.getChildCount() != 2) {
+			return;
+		}
+		Node arrayArg = parent.getChildAtIndex(1);
+		if(!arrayArg.isArrayLit()) {
+			return;
+		}
+		if(arrayArg.getChildCount() == 0) {
+			return;
+		}
+
+		Node functionNode = null;
+		if(parent.getGrandparent() != null) {
+			functionNode = parent.getGrandparent().getParent();
+		}
+		if(functionNode == null) {
+			return;
+		}
+		if(!functionNode.isFunction()) {
+			return;
+		}
+		String constructorName = functionNode.getOriginalName();
+		traverseMXMLAttributes(arrayArg, constructorName);
+	}
+
+	private void traverseMXMLAttributes(Node arrayArg, String qualifiedName) {
+		if(arrayArg.getChildCount() == 0) {
+			return;
+		}
+		boolean alreadyHadQualifiedName = qualifiedName != null;
+		int i = 0;
+		while(i < arrayArg.getChildCount()) {
+			if(qualifiedName == null) {
+				Node nameChild = arrayArg.getChildAtIndex(i);
+				i++;
+				if(!nameChild.isGetProp() && !nameChild.isName()) {
+					throwParseException(nameChild);
+				}
+				qualifiedName = nameChild.getQualifiedName();
+			}
+			Node numPropsChild = arrayArg.getChildAtIndex(i);
+			i++;
+			if(!numPropsChild.isNumber()) {
+				throwParseException(numPropsChild);
+			}
+			int numProps = (int) numPropsChild.getDouble();
+			int minNumPropsChildren = i + numProps * 3;
+			if(arrayArg.getChildCount() < minNumPropsChildren) {
+				throwParseException(arrayArg);
+			}
+			while(i < minNumPropsChildren) {
+				Node nameNode = arrayArg.getChildAtIndex(i);
+				i++;
+				String propName = null;
+				if (nameNode.isString()) {
+					//no parse exception if it's not a string because non-string
+					//values are allowed when using -mxml-reflect-object-property=true
+					propName = nameNode.getString();
+					propertyNamesToKeep.add(propName);
+				}
+				Node propTypeNode = arrayArg.getChildAtIndex(i);
+				i++;
+				if((IMXMLLanguageConstants.ATTRIBUTE_ID.equals(propName) || "_id".equals(propName)) && propTypeNode.isTrue()) {
+					Node valueNode = arrayArg.getChildAtIndex(i);
+					if(valueNode.isString()) {
+						propertyNamesToKeep.add(valueNode.getString());
+					}
+				}
+				if(!propTypeNode.isTrue()) {
+					Node valueNode = arrayArg.getChildAtIndex(i);
+					i++;
+					if(valueNode.isArrayLit()) {
+						traverseMXMLAttributes(valueNode, null);
+					}
+				}
+				else {
+					i++; //skip value
+				}
+			}
+			if(i >= arrayArg.getChildCount()) {
+				throwParseException(arrayArg);
+			}
+			Node numStylesChild = arrayArg.getChildAtIndex(i);
+			i++;
+			if(!numStylesChild.isNumber()) {
+				throwParseException(numStylesChild);
+			}
+			int numStyles = (int) numStylesChild.getDouble();
+			if(numStyles != 0) {
+				throwParseException(numStylesChild);
+			}
+			if(i >= arrayArg.getChildCount()) {
+				throwParseException(arrayArg);
+			}
+			Node numEventsChild = arrayArg.getChildAtIndex(i);
+			i++;
+			if(!numEventsChild.isNumber()) {
+				throwParseException(numEventsChild);
+			}
+			int numEvents = (int) numEventsChild.getDouble();
+			i += numEvents * 2;
+			if(!alreadyHadQualifiedName) {
+				if(i >= arrayArg.getChildCount()) {
+					throwParseException(arrayArg);
+				}
+				Node childrenChild = arrayArg.getChildAtIndex(i);
+				i++;
+				if(!childrenChild.isNull() && !childrenChild.isArrayLit()) {
+					throwParseException(childrenChild);
+				}
+				if(childrenChild.isArrayLit()) {
+					traverseMXMLAttributes(childrenChild, null);
+				}
+				qualifiedName = null;
+			}
+		}
+	}
+
+	private void traverseWatchers(Node n, int startIndex) {
+		if(n.isNull()) {
+			//this is fine, just skip it
+			return;
+		}
+		if(!n.isArrayLit()) {
+			throwParseException(n);
+		}
+
+		int i = startIndex;
+		while(i < n.getChildCount()) {
+			Node indexNode = n.getChildAtIndex(i);
+			i++;
+			if(indexNode.isNull()) {
+				//this is the last child watcher
+				return;
+			}
+			if(!indexNode.isNumber()) {
+				throwParseException(indexNode);
+			}
+			Node watcherTypeNode = n.getChildAtIndex(i);
+			i++;
+			if(!watcherTypeNode.isNumber()) {
+				throwParseException(watcherTypeNode);
+			}
+			int watcherType = (int) watcherTypeNode.getDouble();
+			switch(watcherType) {
+				case 0: { //function
+					Node nameNode = n.getChildAtIndex(i);
+					i++;
+					if(!nameNode.isString()) {
+						throwParseException(nameNode);
+					}
+					String propName = nameNode.getString();
+					propertyNamesToKeep.add(propName);
+					i++; //skip function
+					i++; //skip event names
+					i++; //skip binding indices
+					break;
+				}
+				case 1: { //static property
+					Node nameNode = n.getChildAtIndex(i);
+					i++;
+					if(!nameNode.isString()) {
+						throwParseException(nameNode);
+					}
+					String propName = nameNode.getString();
+					propertyNamesToKeep.add(propName);
+					i++; //skip event names
+					i++; //skip binding indices
+					i++; //skip property getter function
+					i++; //skip mname
+					break;
+				}
+				case 2: { //property
+					Node nameNode = n.getChildAtIndex(i);
+					i++;
+					if(!nameNode.isString()) {
+						throwParseException(nameNode);
+					}
+					String propName = nameNode.getString();
+					propertyNamesToKeep.add(propName);
+					i++; //skip event names
+					i++; //skip binding indices
+					i++; //skip property getter function
+					break;
+				}
+				case 3: { //xml
+					Node nameNode = n.getChildAtIndex(i);
+					i++;
+					if(!nameNode.isString()) {
+						throwParseException(nameNode);
+					}
+					String propName = nameNode.getString();
+					propertyNamesToKeep.add(propName);
+					i++; //skip binding indices\
+				}
+				default: { //unknown!
+					throwParseException(watcherTypeNode);
+				}
+			}
+			Node watcherChildren = n.getChildAtIndex(i);
+			i++;
+			traverseWatchers(watcherChildren, 0);
+		}
+	}
+
+	private void throwParseException(Node unexpectedNode) {
+		throw new RuntimeException("Find MXML property names to keep parse failure: " + unexpectedNode);
+	}
+
+	private void checkForBindings(NodeTraversal t, Node n, Node parent) {
+		if(!n.isGetProp()) {
+			return;
+		}
+		if(parent == null || !parent.isAssign() || parent.getChildCount() < 2) {
+			return;
+		}
+		String qualifiedName = n.getQualifiedName();
+		if(qualifiedName == null) {
+			return;
+		}
+		if(!qualifiedName.endsWith(".prototype._bindings")) {
+			return;
+		}
+		Node bindingsNode = parent.getChildAtIndex(1);
+		if(!bindingsNode.isArrayLit()) {
+			throwParseException(bindingsNode);
+		}
+		int i = 0;
+		Node firstChild = bindingsNode.getChildAtIndex(i);
+		if(firstChild.isGetProp()) {
+			i++; //skip inherited bindings
+		}
+		Node numBindingsChild = bindingsNode.getChildAtIndex(i);
+		i++;
+		if(!numBindingsChild.isNumber()) {
+			throwParseException(numBindingsChild);
+		}
+		int numBindings = (int) numBindingsChild.getDouble();
+		int minNumBindingsChildren = i + numBindings * 3;
+		if(bindingsNode.getChildCount() < minNumBindingsChildren) {
+			throwParseException(bindingsNode);
+		}
+		while(i < minNumBindingsChildren) {
+			Node sourceNode = bindingsNode.getChildAtIndex(i);
+			i++;
+			if(sourceNode.isString()) {
+				String propName = sourceNode.getString();
+				propertyNamesToKeep.add(propName);
+			}
+			else if(sourceNode.isArrayLit()) {
+				for(int j = 0; j < sourceNode.getChildCount(); j++) {
+					Node child = sourceNode.getChildAtIndex(j);
+					if(child.isString()) {
+						String propName = child.getString();
+						if(!propName.contains(".")) {
+							propertyNamesToKeep.add(propName);
+						}
+					}
+				}
+			}
+			i++; //skip event
+			Node targetNode = bindingsNode.getChildAtIndex(i);
+			i++;
+			if(targetNode.isString()) {
+				String propName = targetNode.getString();
+				propertyNamesToKeep.add(propName);
+			}
+			else if(targetNode.isArrayLit()) {
+				for(int j = 0; j < sourceNode.getChildCount(); j++) {
+					Node child = sourceNode.getChildAtIndex(j);
+					if(child.isString()) {
+						String propName = child.getString();
+						if(!propName.contains(".")) {
+							propertyNamesToKeep.add(propName);
+						}
+					}
+				}
+			}
+		}
+		traverseWatchers(bindingsNode, i);
+	}
+}
\ No newline at end of file
diff --git a/compiler-jx/src/main/java/com/google/javascript/jscomp/GenerateRoyaleExports.java b/compiler-jx/src/main/java/com/google/javascript/jscomp/GenerateRoyaleExports.java
new file mode 100644
index 0000000..2ef2f19
--- /dev/null
+++ b/compiler-jx/src/main/java/com/google/javascript/jscomp/GenerateRoyaleExports.java
@@ -0,0 +1,186 @@
+/*
+ * 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.jscomp.NodeTraversal.AbstractPostOrderCallback;
+import com.google.javascript.rhino.IR;
+import com.google.javascript.rhino.JSDocInfo;
+import com.google.javascript.rhino.Node;
+import com.google.javascript.rhino.Token;
+import com.google.javascript.rhino.jstype.JSType;
+import com.google.javascript.rhino.jstype.JSTypeNative;
+
+public class GenerateRoyaleExports extends AbstractPostOrderCallback {
+
+	private final AbstractCompiler compiler;
+	private Set<String> extraSymbolNamesToExport;
+
+	public GenerateRoyaleExports(AbstractCompiler compiler) {
+	  this.compiler = compiler;
+	}
+
+	public void process(Node externs, Node root, Set<String> extraSymbolNamesToExport) {
+		this.extraSymbolNamesToExport = extraSymbolNamesToExport;
+		NodeTraversal.traverse(compiler, root, this);
+	}
+
+	@Override
+	public void visit(NodeTraversal t, Node n, Node parent) {
+		JSDocInfo docInfo = n.getJSDocInfo();
+		if(docInfo == null || docInfo.isExport()) {
+			// if no jsdoc or already exported, we can skip
+			return;
+		}
+
+		switch(n.getToken()) {
+			case STRING_KEY:{
+				Node parentNode = n.getParent();
+				if(parentNode == null) {
+					return;
+				}
+		
+				Node gpNode = parentNode.getParent();
+				if(gpNode == null || gpNode.getToken() != Token.CALL) {
+					return;
+				}
+				
+				Node objNode = gpNode.getChildAtIndex(1);
+				if (!objNode.isQualifiedName()) {
+					return;
+				}
+
+				String accessorQualifiedName = objNode.getQualifiedName() + "." + n.getString();
+				if(!extraSymbolNamesToExport.contains(accessorQualifiedName)) {
+					return;
+				}
+
+				// we found an accessor that needs to be exported
+				// accessors are defined in Object.defineProperties() calls
+				addExtern(n.getString());
+				return;
+			}
+			case GETPROP: {
+				String qualifiedName = n.getQualifiedName();
+				if(!qualifiedName.startsWith("this.$ID_")) {
+					return;
+				}
+				Node gp = n.getGrandparent();
+				if(gp == null) {
+					return;
+				}
+				Node ggp = gp.getParent();
+				if(ggp == null || !ggp.isFunction()) {
+					return;
+				}
+				addExtern(n.getOriginalName());
+				return;
+			}
+			case ASSIGN: {
+				Node firstChild = n.getFirstChild();
+				if (!firstChild.isQualifiedName()) {
+					return;
+				}
+				String qualifiedName = firstChild.getQualifiedName();
+				if(!extraSymbolNamesToExport.contains(qualifiedName)) {
+					return;
+				}
+		
+				Node parentNode = n.getParent();
+				if(parentNode == null) {
+					return;
+				}
+		
+				Node gpNode = parentNode.getParent();
+				if(gpNode == null || !gpNode.isScript()) {
+					return;
+				}
+		
+				// we found a variable or constant that needs to be exported
+				addExportSymbolCall(qualifiedName, n);
+				return;
+			}
+			default:
+				return;
+		}
+	}
+
+	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);
+	}
+
+	private void addExportSymbolCall(String export, Node context) {
+	  Node call =
+		  IR.call(
+			  NodeUtil.newQName(
+				  compiler, compiler.getCodingConvention().getExportSymbolFunction(),
+				  context, export),
+			  IR.string(export),
+			  NodeUtil.newQName(
+				  compiler, export,
+				  context, export));
+  
+	  Node expression = IR.exprResult(call).useSourceInfoIfMissingFromForTree(context);
+	  annotate(expression);
+  
+	  addStatement(context, expression);
+	}
+
+	private void addStatement(Node context, Node stmt) {
+	  CodingConvention convention = compiler.getCodingConvention();
+  
+	  Node n = context;
+	  Node exprRoot = n;
+	  while (!NodeUtil.isStatementBlock(exprRoot.getParent())) {
+		exprRoot = exprRoot.getParent();
+	  }
+  
+	  // It's important that any class-building calls (goog.inherits)
+	  // come right after the class definition, so move the export after that.
+	  while (true) {
+		Node next = exprRoot.getNext();
+		if (next != null
+			&& NodeUtil.isExprCall(next)
+			&& convention.getClassesDefinedByCall(next.getFirstChild()) != null) {
+		  exprRoot = next;
+		} else {
+		  break;
+		}
+	  }
+  
+	  Node block = exprRoot.getParent();
+	  block.addChildAfter(stmt, exprRoot);
+	  compiler.reportChangeToEnclosingScope(stmt);
+	}
+
+	private void annotate(Node node) {
+	  NodeTraversal.traverse(
+		  compiler, node, new PrepareAst.PrepareAnnotations());
+	}
+}
\ No newline at end of file
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/RenamePropertiesWithModuleSupport.java b/compiler-jx/src/main/java/com/google/javascript/jscomp/RenamePropertiesWithModuleSupport.java
index 89ba74a..7e81f91 100644
--- a/compiler-jx/src/main/java/com/google/javascript/jscomp/RenamePropertiesWithModuleSupport.java
+++ b/compiler-jx/src/main/java/com/google/javascript/jscomp/RenamePropertiesWithModuleSupport.java
@@ -138,7 +138,7 @@
    */
   RenamePropertiesWithModuleSupport(AbstractCompiler compiler, boolean generatePseudoNames,
       NameGenerator nameGenerator) {
-    this(compiler, generatePseudoNames, null, null, null, nameGenerator);
+    this(compiler, generatePseudoNames, null, null, null, nameGenerator, null);
   }
 
   /**
@@ -156,9 +156,11 @@
   RenamePropertiesWithModuleSupport(AbstractCompiler compiler,
       boolean generatePseudoNames, VariableMap prevUsedPropertyMap,
       NameGenerator nameGenerator) {
-    this(compiler, generatePseudoNames, prevUsedPropertyMap, null, null, nameGenerator);
+    this(compiler, generatePseudoNames, prevUsedPropertyMap, null, null, nameGenerator, null);
   }
 
+  private Set<String> propertyNamesToKeep;
+
   /**
    * Creates an instance.
    *
@@ -179,13 +181,15 @@
       VariableMap prevUsedPropertyMap,
       @Nullable char[] reservedFirstCharacters,
       @Nullable char[] reservedNonFirstCharacters,
-      NameGenerator nameGenerator) {
+      NameGenerator nameGenerator,
+      Set<String> propertyNamesToKeep) {
     this.compiler = compiler;
     this.generatePseudoNames = generatePseudoNames;
     this.prevUsedPropertyMap = prevUsedPropertyMap;
     this.reservedFirstCharacters = reservedFirstCharacters;
     this.reservedNonFirstCharacters = reservedNonFirstCharacters;
     this.nameGenerator = nameGenerator;
+    this.propertyNamesToKeep = propertyNamesToKeep;
     externedNames.addAll(compiler.getExternProperties());
   }
 
@@ -226,6 +230,9 @@
      */
     reservedNames.addAll(externedNames);
     reservedNames.addAll(quotedNames);
+    if (propertyNamesToKeep != null) {
+      reservedNames.addAll(propertyNamesToKeep);
+    }
     
     generateNames(propsByFreq, reservedNames);
 
@@ -364,6 +371,8 @@
                 propNode.getString())) {
               externedNames.add(propNode.getString());
               break;
+            } else if(propertyNamesToKeep != null && propertyNamesToKeep.contains(propNode.getString())) {
+              break;
             }
             maybeMarkCandidate(propNode);
           }
@@ -378,7 +387,9 @@
               // that could conflict with this quoted key.
               quotedNames.add(key.getString());
             } else if (compiler.getCodingConvention().blockRenamingForProperty(key.getString())) {
-              externedNames.add(key.getString());
+              externedNames.add(key.getString()); 
+            } else if(propertyNamesToKeep != null && propertyNamesToKeep.contains(key.getString())) {
+                continue;
             } else {
               maybeMarkCandidate(key);
             }
@@ -396,6 +407,8 @@
               quotedNames.add(key.getString());
             } else if (compiler.getCodingConvention().blockRenamingForProperty(key.getString())) {
               externedNames.add(key.getString());
+            } else if(propertyNamesToKeep != null && propertyNamesToKeep.contains(key.getString())) {
+                continue;
             } else {
               maybeMarkCandidate(key);
             }
@@ -437,6 +450,8 @@
                   Node fnName = member.getFirstChild();
                   if (compiler.getCodingConvention().blockRenamingForProperty(memberDefName)) {
                     externedNames.add(fnName.getString());
+                  } else if(propertyNamesToKeep != null && propertyNamesToKeep.contains(memberDefName)) {
+                      continue;
                   } else if (memberDefName.equals("constructor")
                       || memberDefName.equals("superClass_")) {
                     // TODO (simarora) is there a better way to identify these externs?
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 449918c..fef8ed8 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;
@@ -135,8 +132,14 @@
   private File varRenameMapFile;
 
   private Set<String> propertyNamesToKeep;
+
+  private Set<String> extraSymbolNamesToExport;
+
+  private boolean preventRenameMxmlSymbolReferences;
   
-  public RoyaleClosurePassConfig(CompilerOptions options, String sourceFileName, File varRenameMapFile, Set<String> propertyNamesToKeep) {
+  public RoyaleClosurePassConfig(CompilerOptions options, String sourceFileName,
+      File varRenameMapFile, Set<String> propertyNamesToKeep,
+      Set<String> extraSymbolNamesToExport, boolean preventRenameMxmlSymbolReferences) {
     super(options);
 
     // The current approach to protecting "hidden" side-effects is to
@@ -146,7 +149,9 @@
     preprocessorSymbolTableFactory = new PreprocessorSymbolTable.CachedInstanceFactory();
     this.varRenameMapFile = varRenameMapFile;
     this.sourceFileName = sourceFileName;
-    this.propertyNamesToKeep = propertyNamesToKeep;
+    this.propertyNamesToKeep = propertyNamesToKeep != null ? propertyNamesToKeep : new HashSet<String>();
+    this.extraSymbolNamesToExport = extraSymbolNamesToExport;
+    this.preventRenameMxmlSymbolReferences = preventRenameMxmlSymbolReferences;
   }
 
   GlobalNamespace getGlobalNamespace() {
@@ -341,8 +346,14 @@
       checks.add(angularPass);
     }
 
-    if (propertyNamesToKeep != null && propertyNamesToKeep.size() > 0) {
-      checks.add(keepPropertyNamesPass);
+    if (preventRenameMxmlSymbolReferences) {
+      checks.add(findRoyaleMxmlPropertiesToKeep);
+    }
+
+    checks.add(keepRoyalePropertyNamesPass);
+
+    if (extraSymbolNamesToExport != null) {
+      checks.add(generateRoyaleExports);
     }
 
     if (!options.generateExportsAfterTypeChecking && options.generateExports) {
@@ -1264,42 +1275,52 @@
           return ES_NEXT;
         }
       };
+  
+  private final PassFactory generateRoyaleExports = 
+    new PassFactory("generate-royale-exports", true) {
+      @Override
+      protected CompilerPass create(final AbstractCompiler compiler) {
+        final GenerateRoyaleExports pass = new GenerateRoyaleExports(compiler);
+        return new CompilerPass() {
+          @Override
+          public void process(Node externs, Node root) {
+            pass.process(externs, root, extraSymbolNamesToExport);
+          }
+        };
+      }
 
-    private final PassFactory keepPropertyNamesPass = 
-        new PassFactory("keep-property-names", true) {
+      @Override
+      protected FeatureSet featureSet() {
+        return ES_NEXT;
+      }
+    };
+  
+    private final PassFactory findRoyaleMxmlPropertiesToKeep = 
+      new PassFactory("find-royale-mxml-properties", true) {
+        @Override
+        protected CompilerPass create(final AbstractCompiler compiler) {
+          final FindRoyaleMXMLPropertyNamesToKeep pass = new FindRoyaleMXMLPropertyNamesToKeep(compiler);
+          return new CompilerPass() {
+            @Override
+            public void process(Node externs, Node root) {
+              pass.process(externs, root, propertyNamesToKeep);
+            }
+          };
+        }
+  
+        @Override
+        protected FeatureSet featureSet() {
+          return ES_NEXT;
+        }
+      };
+
+    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
           protected FeatureSet featureSet() {
             return ES_NEXT;
@@ -3085,7 +3106,8 @@
                       prevPropertyMap,
                       options.getPropertyReservedNamingFirstChars(),
                       options.getPropertyReservedNamingNonFirstChars(),
-                      options.nameGenerator);
+                      options.nameGenerator,
+                      null);
               rprop.process(externs, root);
               compiler.setPropertyMap(rprop.getPropertyMap());
             }
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 2d42011..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;
@@ -50,6 +56,7 @@
 import org.apache.royale.compiler.internal.driver.js.goog.JSGoogCompcConfiguration;
 import org.apache.royale.compiler.internal.projects.CompilerProject;
 import org.apache.royale.compiler.internal.targets.RoyaleSWCTarget;
+import org.apache.royale.compiler.internal.units.SWCCompilationUnit;
 import org.apache.royale.compiler.internal.targets.JSTarget;
 import org.apache.royale.compiler.problems.ICompilerProblem;
 import org.apache.royale.compiler.problems.InternalCompilerProblem;
@@ -59,6 +66,8 @@
 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;
 
@@ -487,89 +496,95 @@
 	                        }
                             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);     	
                             }
-	                        long fileDate = System.currentTimeMillis();
-	                        long zipFileDate = fileDate;
-	                    	String metadataDate = targetSettings.getSWFMetadataDate();
-	                    	if (metadataDate != null)
-	                    	{
-	                    		String metadataFormat = targetSettings.getSWFMetadataDateFormat();
-	                    		try {
-	                    			SimpleDateFormat sdf = new SimpleDateFormat(metadataFormat);
-	                    			Date d = sdf.parse(metadataDate);
-	                    			Calendar cal = new GregorianCalendar();
-	                    			cal.setTime(d);
-	                                sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
-	                    			d = sdf.parse(metadataDate);
-	                    			fileDate = d.getTime();
-	                    			ZonedDateTime zdt = ZonedDateTime.of(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH) + 1, cal.get(Calendar.DAY_OF_MONTH), 
-	                    									cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE), cal.get(Calendar.SECOND), 0, ZoneId.systemDefault());
-	                    			zipFileDate = zdt.toInstant().toEpochMilli();
-	                    		} catch (ParseException e) {
-	                				// TODO Auto-generated catch block
-	                				e.printStackTrace();
-	                			} catch (IllegalArgumentException e1) {
-	                				e1.printStackTrace();
-	                			}
-	                    	}
-	                    	ZipEntry ze = new ZipEntry(outputClassFile);
-	                    	ze.setTime(zipFileDate);
-	                    	ze.setMethod(ZipEntry.STORED);
-	                    	
 	                        ByteArrayOutputStream baos = new ByteArrayOutputStream();
 	                        temp.writeTo(baos);
-	                        ze.setSize(baos.size());
-	                        ze.setCompressedSize(baos.size());
-	                        CRC32 crc = new CRC32();
-	                        crc.reset();
-	                        crc.update(baos.toByteArray());
-	                        ze.setCrc(crc.getValue());
-
-	                        zipOutputStream.putNextEntry(ze);
-	                        baos.writeTo(zipOutputStream);
-                            zipOutputStream.flush();
-	                        zipOutputStream.closeEntry();
-	                        fileList.append("        <file path=\"" + outputClassFile + "\" mod=\"" + fileDate + "\"/>\n");
+                            writeFileToZip(zipOutputStream, outputClassFilePath, baos, fileList);
                             if(sourceMapTemp != null)
                             {
-                                String sourceMapFile = getOutputSourceMapFile(
+                                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);
                                 }
-                                ze = new ZipEntry(sourceMapFile);
-    	                    	ze.setTime(zipFileDate);
-    	                    	ze.setMethod(ZipEntry.STORED);
-    	                    	
     	                        baos = new ByteArrayOutputStream();
-                                sourceMapTemp.writeTo(baos);
-    	                        ze.setSize(baos.size());
-    	                        ze.setCompressedSize(baos.size());
-    	                        crc = new CRC32();
-    	                        crc.reset();
-    	                        crc.update(baos.toByteArray());
-    	                        ze.setCrc(crc.getValue());
-                                
-                                zipOutputStream.putNextEntry(ze);
-    	                        baos.writeTo(zipOutputStream);
-                                zipOutputStream.flush();
-                                zipOutputStream.closeEntry();
-                                fileList.append("        <file path=\"" + sourceMapFile + "\" mod=\"" + fileDate + "\"/>\n");
+                                processSourceMap(sourceMapTemp, baos, outputClassFile, symbol);
+                                writeFileToZip(zipOutputStream, sourceMapFilePath, baos, fileList);
                             }
                             writer.close();
                         }
                     }
+                    else if (cuType == ICompilationUnit.UnitType.SWC_UNIT)
+                    {
+                    	String symbol = cu.getQualifiedNames().get(0);
+                    	if (externs.contains(symbol)) continue;
+                    	if (project.isExternalLinkage(cu)) continue;
+                    	if (!packingSWC)
+                    	{
+                            // we probably shouldn't skip this -JT
+                            continue;
+                        }
+
+                        // if another .swc file is on our library-path, we must
+                        // include the .js (and .js.map) files because the
+                        // bytecode will also be included. if we have the
+                        // bytecode, but not the .js files, the compiler won't
+                        // know where to find the .js files. that's really bad.
+
+                        // if the bytecode and .js files should not be included,
+                        // then the developer is expected to use
+                        // external-library-path instead of library-path.
+
+                        SWCCompilationUnit swcCU = (SWCCompilationUnit) cu;
+                        String outputClassFile = getOutputClassFile(
+                                cu.getQualifiedNames().get(0),
+                                jsOut,
+                                false).getPath();
+                        outputClassFile = outputClassFile.replace('\\', '/');
+                        ISWCFileEntry fileEntry = swcCU.getSWC().getFile(outputClassFile);
+                        if (fileEntry == null)
+                        {
+                            continue;
+                        }
+                        if (config.isVerbose())
+                        {
+                            System.out.println("Writing file: " + outputClassFile + " from SWC: " + swcCU.getAbsoluteFilename());
+                        }
+                        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+                        InputStream fileStream = fileEntry.createInputStream();
+                        IOUtils.copy(fileStream, baos);
+                        fileStream.close();
+                        writeFileToZip(zipOutputStream, outputClassFile, baos, fileList);
+
+                        String outputMapFile = outputClassFile + ".map";
+                        fileEntry = swcCU.getSWC().getFile(outputMapFile);
+                        if (fileEntry == null)
+                        {
+                            continue;
+                        }
+                        if (config.isVerbose())
+                        {
+                            System.out.println("Writing file: " + outputMapFile + " from SWC: " + swcCU.getAbsoluteFilename());
+                        }
+                        baos = new ByteArrayOutputStream();
+                        fileStream = fileEntry.createInputStream();
+                        IOUtils.copy(fileStream, baos);
+                        fileStream.close();
+                        writeFileToZip(zipOutputStream, outputMapFile, baos, fileList);
+                    }
                 }
                 if (packingSWC)
                 {
@@ -669,6 +684,100 @@
         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();
+        long zipFileDate = fileDate;
+        String metadataDate = targetSettings.getSWFMetadataDate();
+        if (metadataDate != null)
+        {
+            String metadataFormat = targetSettings.getSWFMetadataDateFormat();
+            try {
+                SimpleDateFormat sdf = new SimpleDateFormat(metadataFormat);
+                Date d = sdf.parse(metadataDate);
+                Calendar cal = new GregorianCalendar();
+                cal.setTime(d);
+                sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
+                d = sdf.parse(metadataDate);
+                fileDate = d.getTime();
+                ZonedDateTime zdt = ZonedDateTime.of(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH) + 1, cal.get(Calendar.DAY_OF_MONTH), 
+                                        cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE), cal.get(Calendar.SECOND), 0, ZoneId.systemDefault());
+                zipFileDate = zdt.toInstant().toEpochMilli();
+            } catch (ParseException e) {
+                // TODO Auto-generated catch block
+                e.printStackTrace();
+            } catch (IllegalArgumentException e1) {
+                e1.printStackTrace();
+            }
+        }
+        ZipEntry ze = new ZipEntry(entryFilePath);
+        ze.setTime(zipFileDate);
+        ze.setMethod(ZipEntry.STORED);
+        
+        ze.setSize(baos.size());
+        ze.setCompressedSize(baos.size());
+        CRC32 crc = new CRC32();
+        crc.reset();
+        crc.update(baos.toByteArray());
+        ze.setCrc(crc.getValue());
+
+        zipOutputStream.putNextEntry(ze);
+        baos.writeTo(zipOutputStream);
+        zipOutputStream.flush();
+        zipOutputStream.closeEntry();
+        fileList.append("        <file path=\"" + entryFilePath + "\" mod=\"" + fileDate + "\"/>\n");
+    }
+
     /**
      * Build target artifact.
      * 
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 57d2ead..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,16 +26,31 @@
 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;
+import java.time.ZonedDateTime;
 import java.util.ArrayList;
+import java.util.Calendar;
 import java.util.Collection;
+import java.util.Date;
 import java.util.Enumeration;
+import java.util.GregorianCalendar;
 import java.util.List;
 import java.util.Set;
+import java.util.TimeZone;
+import java.util.zip.CRC32;
 import java.util.zip.Deflater;
 import java.util.zip.ZipEntry;
 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;
@@ -50,6 +65,7 @@
 import org.apache.royale.compiler.internal.projects.CompilerProject;
 import org.apache.royale.compiler.internal.projects.RoyaleJSProject;
 import org.apache.royale.compiler.internal.targets.RoyaleSWCTarget;
+import org.apache.royale.compiler.internal.units.SWCCompilationUnit;
 import org.apache.royale.compiler.internal.targets.JSTarget;
 import org.apache.royale.compiler.internal.workspaces.Workspace;
 import org.apache.royale.compiler.problems.ICompilerProblem;
@@ -59,6 +75,8 @@
 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;
 
 /**
@@ -343,38 +361,95 @@
 	                        }
                             writer.writeTo(temp, sourceMapTemp, null);
 
-                    		String outputClassFile = getOutputClassFile(
+                    		File outputClassFile = getOutputClassFile(
                                     cu.getQualifiedNames().get(0),
                                     isExterns ? externsOut : jsOut,
-                                    false).getPath();
+                                    false);
+                            String outputClassFilePath = outputClassFile.getPath();
+                            outputClassFilePath = outputClassFilePath.replace('\\', '/');
                             if (config.isVerbose())
                             {
-                                System.out.println("Writing file: " + outputClassFile);     	
+                                System.out.println("Writing file: " + outputClassFilePath);     	
                             }
-	                        zipOutputStream.putNextEntry(new ZipEntry(outputClassFile));
-	                        temp.writeTo(zipOutputStream);
-                            zipOutputStream.flush();
-	                        zipOutputStream.closeEntry();
-	                        fileList.append("        <file path=\"" + outputClassFile + "\" mod=\"" + System.currentTimeMillis() + "\"/>\n");
+	                        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+	                        temp.writeTo(baos);
+                            writeFileToZip(zipOutputStream, outputClassFilePath, baos, fileList);
                             if(sourceMapTemp != null)
                             {
-                                String sourceMapFile = getOutputSourceMapFile(
+                                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);
                                 }
-                                zipOutputStream.putNextEntry(new ZipEntry(sourceMapFile));
-                                sourceMapTemp.writeTo(zipOutputStream);
-                                zipOutputStream.flush();
-                                zipOutputStream.closeEntry();
-                                fileList.append("        <file path=\"" + sourceMapFile + "\" mod=\"" + System.currentTimeMillis() + "\"/>\n");
+    	                        baos = new ByteArrayOutputStream();
+                                processSourceMap(sourceMapTemp, baos, outputClassFile, symbol);
+                                writeFileToZip(zipOutputStream, sourceMapFilePath, baos, fileList);
                             }
                             writer.close();
                         }
                     }
+                    else if (cuType == ICompilationUnit.UnitType.SWC_UNIT)
+                    {
+                    	String symbol = cu.getQualifiedNames().get(0);
+                    	if (externs.contains(symbol)) continue;
+                    	if (project.isExternalLinkage(cu)) continue;
+                    	if (!packingSWC)
+                    	{
+                            // we probably shouldn't skip this -JT
+                            continue;
+                        }
+
+                        // if another .swc file is on our library-path, we must
+                        // include the .js (and .js.map) files because the
+                        // bytecode will also be included. if we have the
+                        // bytecode, but not the .js files, the compiler won't
+                        // know where to find the .js files. that's really bad.
+
+                        // if the bytecode and .js files should not be included,
+                        // then the developer is expected to use
+                        // external-library-path instead of library-path.
+
+                        SWCCompilationUnit swcCU = (SWCCompilationUnit) cu;
+                        String outputClassFile = getOutputClassFile(
+                                cu.getQualifiedNames().get(0),
+                                jsOut,
+                                false).getPath();
+                        outputClassFile = outputClassFile.replace('\\', '/');
+                        ISWCFileEntry fileEntry = swcCU.getSWC().getFile(outputClassFile);
+                        if (fileEntry == null)
+                        {
+                            continue;
+                        }
+                        if (config.isVerbose())
+                        {
+                            System.out.println("Writing file: " + outputClassFile + " from SWC: " + swcCU.getAbsoluteFilename());
+                        }
+                        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+                        InputStream fileStream = fileEntry.createInputStream();
+                        IOUtils.copy(fileStream, baos);
+                        fileStream.close();
+                        writeFileToZip(zipOutputStream, outputClassFile, baos, fileList);
+
+                        String outputMapFile = outputClassFile + ".map";
+                        fileEntry = swcCU.getSWC().getFile(outputMapFile);
+                        if (fileEntry == null)
+                        {
+                            continue;
+                        }
+                        if (config.isVerbose())
+                        {
+                            System.out.println("Writing file: " + outputMapFile + " from SWC: " + swcCU.getAbsoluteFilename());
+                        }
+                        baos = new ByteArrayOutputStream();
+                        fileStream = fileEntry.createInputStream();
+                        IOUtils.copy(fileStream, baos);
+                        fileStream.close();
+                        writeFileToZip(zipOutputStream, outputMapFile, baos, fileList);
+                    }
                 }
                 if (packingSWC)
                 {
@@ -406,6 +481,100 @@
         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();
+        long zipFileDate = fileDate;
+        String metadataDate = targetSettings.getSWFMetadataDate();
+        if (metadataDate != null)
+        {
+            String metadataFormat = targetSettings.getSWFMetadataDateFormat();
+            try {
+                SimpleDateFormat sdf = new SimpleDateFormat(metadataFormat);
+                Date d = sdf.parse(metadataDate);
+                Calendar cal = new GregorianCalendar();
+                cal.setTime(d);
+                sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
+                d = sdf.parse(metadataDate);
+                fileDate = d.getTime();
+                ZonedDateTime zdt = ZonedDateTime.of(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH) + 1, cal.get(Calendar.DAY_OF_MONTH), 
+                                        cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE), cal.get(Calendar.SECOND), 0, ZoneId.systemDefault());
+                zipFileDate = zdt.toInstant().toEpochMilli();
+            } catch (ParseException e) {
+                // TODO Auto-generated catch block
+                e.printStackTrace();
+            } catch (IllegalArgumentException e1) {
+                e1.printStackTrace();
+            }
+        }
+        ZipEntry ze = new ZipEntry(entryFilePath);
+        ze.setTime(zipFileDate);
+        ze.setMethod(ZipEntry.STORED);
+        
+        ze.setSize(baos.size());
+        ze.setCompressedSize(baos.size());
+        CRC32 crc = new CRC32();
+        crc.reset();
+        crc.update(baos.toByteArray());
+        ze.setCrc(crc.getValue());
+
+        zipOutputStream.putNextEntry(ze);
+        baos.writeTo(zipOutputStream);
+        zipOutputStream.flush();
+        zipOutputStream.closeEntry();
+        fileList.append("        <file path=\"" + entryFilePath + "\" mod=\"" + fileDate + "\"/>\n");
+    }
+
     /**
      * Build target artifact.
      * 
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 a370772..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;
@@ -51,6 +57,7 @@
 import org.apache.royale.compiler.internal.projects.CompilerProject;
 import org.apache.royale.compiler.internal.projects.RoyaleJSProject;
 import org.apache.royale.compiler.internal.targets.RoyaleSWCTarget;
+import org.apache.royale.compiler.internal.units.SWCCompilationUnit;
 import org.apache.royale.compiler.internal.targets.JSTarget;
 import org.apache.royale.compiler.internal.workspaces.Workspace;
 import org.apache.royale.compiler.problems.ICompilerProblem;
@@ -61,6 +68,8 @@
 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;
 
 /**
@@ -373,90 +382,96 @@
 	                        }
                             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);     	
                             }
-	                        long fileDate = System.currentTimeMillis();
-	                        long zipFileDate = fileDate;
-	                    	String metadataDate = targetSettings.getSWFMetadataDate();
-	                    	if (metadataDate != null)
-	                    	{
-	                    		String metadataFormat = targetSettings.getSWFMetadataDateFormat();
-	                    		try {
-	                    			SimpleDateFormat sdf = new SimpleDateFormat(metadataFormat);
-	                    			Date d = sdf.parse(metadataDate);
-	                    			Calendar cal = new GregorianCalendar();
-	                    			cal.setTime(d);
-	                                sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
-	                    			d = sdf.parse(metadataDate);
-	                    			fileDate = d.getTime();
-	                    			ZonedDateTime zdt = ZonedDateTime.of(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH) + 1, cal.get(Calendar.DAY_OF_MONTH), 
-	                    									cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE), cal.get(Calendar.SECOND), 0, ZoneId.systemDefault());
-	                    			zipFileDate = zdt.toInstant().toEpochMilli();
-	                    		} catch (ParseException e) {
-	                				// TODO Auto-generated catch block
-	                				e.printStackTrace();
-	                			} catch (IllegalArgumentException e1) {
-	                				e1.printStackTrace();
-	                			}
-	                    	}
-	                    	ZipEntry ze = new ZipEntry(outputClassFile);
-	                    	ze.setTime(zipFileDate);
-	                    	ze.setMethod(ZipEntry.STORED);
-	                    	
 	                        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-	                        temp.writeTo(baos);
-	                        ze.setSize(baos.size());
-	                        ze.setCompressedSize(baos.size());
-	                        CRC32 crc = new CRC32();
-	                        crc.reset();
-	                        crc.update(baos.toByteArray());
-	                        ze.setCrc(crc.getValue());
-
-	                        zipOutputStream.putNextEntry(ze);
-	                        baos.writeTo(zipOutputStream);
-                            zipOutputStream.flush();
-                            zipOutputStream.closeEntry();
-                            fileList.append("        <file path=\"" + outputClassFile + "\" mod=\"" + fileDate + "\"/>\n");
+                            temp.writeTo(baos);
+                            writeFileToZip(zipOutputStream, outputClassFilePath, baos, fileList);
                             
                             if(sourceMapTemp != null)
                             {
-                                String sourceMapFile = getOutputSourceMapFile(
-                                                                                cu.getQualifiedNames().get(0),
-                                                                                isExterns ? externsOut : jsOut,
-                                                                                false).getPath();
+                                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);
                                 }
-                                ze = new ZipEntry(sourceMapFile);
-                                ze.setTime(zipFileDate);
-                                ze.setMethod(ZipEntry.STORED);
-                                
                                 baos = new ByteArrayOutputStream();
-                                sourceMapTemp.writeTo(baos);
-                                ze.setSize(baos.size());
-                                ze.setCompressedSize(baos.size());
-                                crc = new CRC32();
-                                crc.reset();
-                                crc.update(baos.toByteArray());
-                                ze.setCrc(crc.getValue());
-                                
-                                zipOutputStream.putNextEntry(ze);
-                                baos.writeTo(zipOutputStream);
-                                zipOutputStream.flush();
-                                zipOutputStream.closeEntry();
-                                fileList.append("        <file path=\"" + sourceMapFile + "\" mod=\"" + fileDate + "\"/>\n");
+                                processSourceMap(sourceMapTemp, baos, outputClassFile, symbol);
+                                writeFileToZip(zipOutputStream, sourceMapFilePath, baos, fileList);
                             }
 	                        writer.close();
                     	}
                     }
+                    else if (cuType == ICompilationUnit.UnitType.SWC_UNIT)
+                    {
+                    	String symbol = cu.getQualifiedNames().get(0);
+                    	if (externs.contains(symbol)) continue;
+                    	if (project.isExternalLinkage(cu)) continue;
+                    	if (!packingSWC)
+                    	{
+                            // we probably shouldn't skip this -JT
+                            continue;
+                        }
+
+                        // if another .swc file is on our library-path, we must
+                        // include the .js (and .js.map) files because the
+                        // bytecode will also be included. if we have the
+                        // bytecode, but not the .js files, the compiler won't
+                        // know where to find the .js files. that's really bad.
+
+                        // if the bytecode and .js files should not be included,
+                        // then the developer is expected to use
+                        // external-library-path instead of library-path.
+
+                        SWCCompilationUnit swcCU = (SWCCompilationUnit) cu;
+                        String outputClassFile = getOutputClassFile(
+                                cu.getQualifiedNames().get(0),
+                                jsOut,
+                                false).getPath();
+                        outputClassFile = outputClassFile.replace('\\', '/');
+                        ISWCFileEntry fileEntry = swcCU.getSWC().getFile(outputClassFile);
+                        if (fileEntry == null)
+                        {
+                            continue;
+                        }
+                        if (config.isVerbose())
+                        {
+                            System.out.println("Writing file: " + outputClassFile + " from SWC: " + swcCU.getAbsoluteFilename());
+                        }
+                        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+                        InputStream fileStream = fileEntry.createInputStream();
+                        IOUtils.copy(fileStream, baos);
+                        fileStream.close();
+                        writeFileToZip(zipOutputStream, outputClassFile, baos, fileList);
+
+                        String outputMapFile = outputClassFile + ".map";
+                        fileEntry = swcCU.getSWC().getFile(outputMapFile);
+                        if (fileEntry == null)
+                        {
+                            continue;
+                        }
+                        if (config.isVerbose())
+                        {
+                            System.out.println("Writing file: " + outputMapFile + " from SWC: " + swcCU.getAbsoluteFilename());
+                        }
+                        baos = new ByteArrayOutputStream();
+                        fileStream = fileEntry.createInputStream();
+                        IOUtils.copy(fileStream, baos);
+                        fileStream.close();
+                        writeFileToZip(zipOutputStream, outputMapFile, baos, fileList);
+                    }
                 }
                 if (!config.getCreateTargetWithErrors())
                 {
@@ -533,6 +548,100 @@
         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();
+        long zipFileDate = fileDate;
+        String metadataDate = targetSettings.getSWFMetadataDate();
+        if (metadataDate != null)
+        {
+            String metadataFormat = targetSettings.getSWFMetadataDateFormat();
+            try {
+                SimpleDateFormat sdf = new SimpleDateFormat(metadataFormat);
+                Date d = sdf.parse(metadataDate);
+                Calendar cal = new GregorianCalendar();
+                cal.setTime(d);
+                sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
+                d = sdf.parse(metadataDate);
+                fileDate = d.getTime();
+                ZonedDateTime zdt = ZonedDateTime.of(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH) + 1, cal.get(Calendar.DAY_OF_MONTH), 
+                                        cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE), cal.get(Calendar.SECOND), 0, ZoneId.systemDefault());
+                zipFileDate = zdt.toInstant().toEpochMilli();
+            } catch (ParseException e) {
+                // TODO Auto-generated catch block
+                e.printStackTrace();
+            } catch (IllegalArgumentException e1) {
+                e1.printStackTrace();
+            }
+        }
+        ZipEntry ze = new ZipEntry(entryFilePath);
+        ze.setTime(zipFileDate);
+        ze.setMethod(ZipEntry.STORED);
+        
+        ze.setSize(baos.size());
+        ze.setCompressedSize(baos.size());
+        CRC32 crc = new CRC32();
+        crc.reset();
+        crc.update(baos.toByteArray());
+        ze.setCrc(crc.getValue());
+
+        zipOutputStream.putNextEntry(ze);
+        baos.writeTo(zipOutputStream);
+        zipOutputStream.flush();
+        zipOutputStream.closeEntry();
+        fileList.append("        <file path=\"" + entryFilePath + "\" mod=\"" + fileDate + "\"/>\n");
+    }
+
     /**
      * Build target artifact.
      * 
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/MXMLJSC.java b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSC.java
index 748c169..1b86589 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSC.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSC.java
@@ -534,6 +534,8 @@
                 }
 
                 Set<String> closurePropNamesToKeep = new HashSet<String>();
+                //use a LinkedHashSet because the order of the exported names matters -JT
+                LinkedHashSet<String> closureSymbolNamesToExport = new LinkedHashSet<String>();
                 jsPublisher = (IJSGoogPublisher) project.getBackend().createPublisher(
                         project, errors, config);
 
@@ -620,12 +622,14 @@
 	                    	}
 	                    }
                         ClosureUtils.collectPropertyNamesToKeep(cu, project, closurePropNamesToKeep);
+                        ClosureUtils.collectSymbolNamesToExport(cu, project, closureSymbolNamesToExport);
 	                }
                 }
                 
                 if (jsPublisher != null)
                 {
                     jsPublisher.setClosurePropertyNamesToKeep(closurePropNamesToKeep);
+                    jsPublisher.setClosureSymbolNamesToExport(closureSymbolNamesToExport);
                     compilationSuccess = jsPublisher.publish(problems);
                 }
                 else
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCNative.java b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCNative.java
index 9b54b1e..1a92629 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCNative.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCNative.java
@@ -28,6 +28,7 @@
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashSet;
+import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Set;
 import java.util.TreeSet;
@@ -318,6 +319,8 @@
                 }
 
                 Set<String> closurePropNamesToKeep = new HashSet<String>();
+                //use a LinkedHashSet because the order of the exported names matters -JT
+                LinkedHashSet<String> closureSymbolNamesToExport = new LinkedHashSet<String>();
                 jsPublisher = (IJSGoogPublisher) project.getBackend().createPublisher(
                         project, errors, config);
 
@@ -385,12 +388,14 @@
 	                        writer.close();
 	                    }
                         ClosureUtils.collectPropertyNamesToKeep(cu, project, closurePropNamesToKeep);
+                        ClosureUtils.collectSymbolNamesToExport(cu, project, closureSymbolNamesToExport);
 	                }
                 }
                 
                 if (jsPublisher != null)
                 {
                     jsPublisher.setClosurePropertyNamesToKeep(closurePropNamesToKeep);
+                    jsPublisher.setClosureSymbolNamesToExport(closureSymbolNamesToExport);
                     compilationSuccess = jsPublisher.publish(problems);
                 }
                 else
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCNode.java b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCNode.java
index 70c1c24..32132b4 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCNode.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCNode.java
@@ -28,6 +28,7 @@
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashSet;
+import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Set;
 import java.util.TreeSet;
@@ -320,6 +321,8 @@
                 }
 
                 Set<String> closurePropNamesToKeep = new HashSet<String>();
+                //use a LinkedHashSet because the order of the exported names matters -JT
+                LinkedHashSet<String> closureSymbolNamesToExport = new LinkedHashSet<String>();
                 jsPublisher = (IJSGoogPublisher) project.getBackend().createPublisher(
                         project, errors, config);
 
@@ -387,11 +390,14 @@
 	                        writer.close();
 	                    }
                         ClosureUtils.collectPropertyNamesToKeep(cu, project, closurePropNamesToKeep);
+                        ClosureUtils.collectSymbolNamesToExport(cu, project, closureSymbolNamesToExport);
 	                }
                 }
                 
                 if (jsPublisher != null)
                 {
+                    jsPublisher.setClosurePropertyNamesToKeep(closurePropNamesToKeep);
+                    jsPublisher.setClosureSymbolNamesToExport(closureSymbolNamesToExport);
                     compilationSuccess = jsPublisher.publish(problems);
                 }
                 else
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 fe73f30..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
@@ -339,6 +339,8 @@
                 }
 
                 Set<String> closurePropNamesToKeep = new HashSet<String>();
+                //use a LinkedHashSet because the order of the exported names matters -JT
+                LinkedHashSet<String> closureSymbolNamesToExport = new LinkedHashSet<String>();
                 jsPublisher = (IJSGoogPublisher) project.getBackend().createPublisher(
                         project, errors, config);
 
@@ -417,6 +419,7 @@
 	                        writer.close();
 	                    }
                         ClosureUtils.collectPropertyNamesToKeep(cu, project, closurePropNamesToKeep);
+                        ClosureUtils.collectSymbolNamesToExport(cu, project, closureSymbolNamesToExport);
 	                }
 	                File externsReportFile = googConfiguration.getExternsReport();
 	                if (externsReportFile != null)
@@ -435,6 +438,7 @@
                 if (jsPublisher != null)
                 {
                     jsPublisher.setClosurePropertyNamesToKeep(closurePropNamesToKeep);
+                    jsPublisher.setClosureSymbolNamesToExport(closureSymbolNamesToExport);
                     compilationSuccess = jsPublisher.publish(problems);
                 }
                 else
@@ -780,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/clients/MXMLJSCRoyaleCordova.java b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCRoyaleCordova.java
index 80bca1a..a508ec2 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCRoyaleCordova.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCRoyaleCordova.java
@@ -28,6 +28,7 @@
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashSet;
+import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Set;
 import java.util.TreeSet;
@@ -323,6 +324,8 @@
                 }
 
                 Set<String> closurePropNamesToKeep = new HashSet<String>();
+                //use a LinkedHashSet because the order of the exported names matters -JT
+                LinkedHashSet<String> closureSymbolNamesToExport = new LinkedHashSet<String>();
                 jsPublisher = (IJSGoogPublisher) project.getBackend().createPublisher(
                         project, errors, config);
 
@@ -390,12 +393,14 @@
 	                        writer.close();
 	                    }
                         ClosureUtils.collectPropertyNamesToKeep(cu, project, closurePropNamesToKeep);
+                        ClosureUtils.collectSymbolNamesToExport(cu, project, closureSymbolNamesToExport);
 	                }
                 }
                 
                 if (jsPublisher != null)
                 {
                     jsPublisher.setClosurePropertyNamesToKeep(closurePropNamesToKeep);
+                    jsPublisher.setClosureSymbolNamesToExport(closureSymbolNamesToExport);
                     compilationSuccess = jsPublisher.publish(problems);
                 }
                 else
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/RoyaleToolGroup.java b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/RoyaleToolGroup.java
index 4a60041..d2bf90f 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/RoyaleToolGroup.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/RoyaleToolGroup.java
@@ -32,6 +32,7 @@
         addFlexTool(new MXMLJSC());
         addFlexTool(new ASDOCJSC(new MXMLRoyaleASDocDITABackend()));
         addFlexTool(new EXTERNC());
+        addFlexTool(new PLAYERGLOBALC());
     }
 
 }
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/codegen/js/goog/IJSGoogDocEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/codegen/js/goog/IJSGoogDocEmitter.java
index 6c99459..33b2afa 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/codegen/js/goog/IJSGoogDocEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/codegen/js/goog/IJSGoogDocEmitter.java
@@ -130,6 +130,8 @@
 
     void emitProtected(IASNode node);
 
+    void emitInternal(IASNode node);
+
     void emitReturn(IFunctionNode node, String packageName);
 
     void emitThis(ITypeDefinition node, String packageName);
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/codegen/js/goog/IJSGoogPublisher.java b/compiler-jx/src/main/java/org/apache/royale/compiler/codegen/js/goog/IJSGoogPublisher.java
index eaa3bad..20fbab6 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/codegen/js/goog/IJSGoogPublisher.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/codegen/js/goog/IJSGoogPublisher.java
@@ -30,4 +30,5 @@
 public interface IJSGoogPublisher extends IJSPublisher
 {
 	void setClosurePropertyNamesToKeep(Set<String> propertyNames);
+	void setClosureSymbolNamesToExport(Set<String> symbolNames);
 }
\ No newline at end of file
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/codegen/mxml/js/IMXMLJSEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/codegen/mxml/js/IMXMLJSEmitter.java
new file mode 100644
index 0000000..4d4dde4
--- /dev/null
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/codegen/mxml/js/IMXMLJSEmitter.java
@@ -0,0 +1,27 @@
+/*
+ *
+ *  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.codegen.mxml.js;
+
+import org.apache.royale.compiler.codegen.js.IMappingEmitter;
+import org.apache.royale.compiler.codegen.mxml.IMXMLEmitter;
+
+public interface IMXMLJSEmitter extends IMXMLEmitter, IMappingEmitter {
+	
+}
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/JSSessionModel.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/JSSessionModel.java
index 6b6ca6d..ce9d2c7 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/JSSessionModel.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/JSSessionModel.java
@@ -45,8 +45,10 @@
         public ITypeDefinition type;
         public boolean resolvedExport;
         public String name;
+        public String originalName;
         public String uri;
         public boolean suppressExport;
+        public boolean preventRename;
     }
 
     public static class BindableVarInfo
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/goog/JSGoogDocEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/goog/JSGoogDocEmitter.java
index 40d28a0..f5620b5 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/goog/JSGoogDocEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/goog/JSGoogDocEmitter.java
@@ -122,6 +122,10 @@
         {
             emitProtected(node);
         }
+        else if (ns == IASKeywordConstants.INTERNAL)
+        {
+            emitInternal(node);
+        }
 
         if (node.isConst())
             emitConst(node);
@@ -339,6 +343,12 @@
     }
 
     @Override
+    public void emitInternal(IASNode node)
+    {
+        emitJSDocLine(JSGoogDocEmitterTokens.PACKAGE);
+    }
+
+    @Override
     public void emitPublic(IASNode node)
     {
         emitJSDocLine(JSGoogDocEmitterTokens.EXPORT);
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/goog/JSGoogDocEmitterTokens.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/goog/JSGoogDocEmitterTokens.java
index 623f131..4a777aa 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/goog/JSGoogDocEmitterTokens.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/goog/JSGoogDocEmitterTokens.java
@@ -22,7 +22,7 @@
 
 public enum JSGoogDocEmitterTokens implements IEmitterTokens
 {
-    PARAM("param"), STAR("*"), TYPE("type"), EXPOSE("expose"), EXPORT("export"), NOCOLLAPSE("nocollapse");
+    PARAM("param"), STAR("*"), TYPE("type"), EXPOSE("expose"), EXPORT("export"), NOCOLLAPSE("nocollapse"), PACKAGE("package");
 
     private String token;
 
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/goog/JSGoogEmitterTokens.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/goog/JSGoogEmitterTokens.java
index 8afd294..75ffea6 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/goog/JSGoogEmitterTokens.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/goog/JSGoogEmitterTokens.java
@@ -38,7 +38,8 @@
     ARRAY("Array"),
     ERROR("Error"),
     SELF("self"),
-    SUPERCLASS("superClass_");
+    SUPERCLASS("superClass_"),
+    GOOG_REFLECT_OBJECTPROPERTY("goog.reflect.objectProperty");
 
     private String token;
 
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 e5a5998..2c193bc 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
@@ -50,7 +50,6 @@
 import org.apache.royale.compiler.internal.tree.as.FunctionNode;
 import org.apache.royale.compiler.internal.tree.as.GetterNode;
 import org.apache.royale.compiler.internal.tree.as.SetterNode;
-import org.apache.royale.compiler.projects.ICompilerProject;
 import org.apache.royale.compiler.tree.ASTNodeID;
 import org.apache.royale.compiler.tree.as.IAccessorNode;
 import org.apache.royale.compiler.tree.as.IGetterNode;
@@ -86,7 +85,7 @@
         RoyaleJSProject project = (RoyaleJSProject)getWalker().getProject();
         boolean emitExports = true;
         if (project != null && project.config != null)
-        	emitExports = project.config.getExportPublicSymbols();
+            emitExports = project.config.getExportPublicSymbols();
 
         if (!getModel().getPropertyMap().isEmpty())
         {
@@ -106,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);
@@ -130,7 +128,47 @@
                 }
                 else
                 {
-	                if (getterNode != null)
+                    IAccessorNode accessorNode = (getterNode != null) ? getterNode : setterNode;
+                    if(!accessorNode.getDefinition().isOverride())
+                    {
+                        // start by writing out the instance accessors as regular variables
+                        // because Closure Compiler doesn't properly analyze calls to
+                        // defineProperties() alone.
+                        // since there's no analysis, Closure assumes that getters/setters
+                        // have no side effects, which results in important get/set calls
+                        // being removed as dead code.
+                        // defining the accessors as variables first convinces Closure to
+                        // handle them more intelligently while not preventing them from
+                        // being real accessors.
+                        // Source: https://developers.google.com/closure/compiler/docs/limitations
+                        writeNewline();
+                        writeNewline();
+                        writeNewline();
+                        writeNewline("/**");
+                        if (p.preventRename)
+                            writeNewline(" * @nocollapse");
+                        if (p.resolvedExport && !p.suppressExport)
+                            writeNewline(" * @export");
+                        if (p.type != null)
+                            writeNewline(" * @type {" + JSGoogDocEmitter.convertASTypeToJSType(p.type.getBaseName(), p.type.getPackageName()) + "}"); 
+                        writeNewline(" */");
+                        write(getEmitter().formatQualifiedName(qname));
+                        write(ASEmitterTokens.MEMBER_ACCESS);
+                        write(JSEmitterTokens.PROTOTYPE);
+                        write(ASEmitterTokens.MEMBER_ACCESS);
+                        if (p.uri != null)
+                        {
+                            INamespaceDecorationNode ns = ((FunctionNode) accessorNode).getActualNamespaceNode();
+                            INamespaceDefinition nsDef = (INamespaceDefinition)ns.resolve(project);
+                            fjs.formatQualifiedName(nsDef.getQualifiedName()); // register with used names
+                            write(JSRoyaleEmitter.formatNamespacedProperty(p.uri, baseName, false));
+                        }
+                        else
+                            write(baseName);
+                        write(ASEmitterTokens.SEMICOLON);
+                    }
+
+                    if (getterNode != null)
 	                {
 	                    writeNewline();
 	                    writeNewline();
@@ -277,7 +315,7 @@
 	                        write(ASEmitterTokens.PAREN_CLOSE);
 	                        writeNewline(ASEmitterTokens.SEMICOLON);
 	                        writeNewline("    this.dispatchEvent("+fjs.formatQualifiedName(BindableEmitter.VALUECHANGE_EVENT_QNAME)+".createUpdateEvent(");
-	                        writeNewline("         this, \"" + baseName + "\", oldValue, value));");
+	                        writeNewline("         this, \"" + p.originalName + "\", oldValue, value));");
 	                        writeNewline(ASEmitterTokens.BLOCK_CLOSE);
 	                        write(ASEmitterTokens.BLOCK_CLOSE);
 	                        write(ASEmitterTokens.SEMICOLON);                        
@@ -320,20 +358,15 @@
                 String baseName = p.name;
                 IGetterNode getterNode = p.getter;
                 ISetterNode setterNode = p.setter;
-            	writeNewline("/**");
-            	//only export if one of the options is public
-            	//if either one is marked as suppressed, both are considered to be
-                if (emitExports && p.resolvedExport && !(p.suppressExport) )
-                	writeNewline("  * @export");
+                writeNewline("/**");
                 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)
                 {
@@ -490,13 +523,12 @@
                     writeNewline();
                     writeNewline();
                     writeNewline();
-                	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)
                     {
@@ -515,7 +547,42 @@
                 }
                 else
                 {
-	                if (getterNode != null)
+                    // start by writing out the static accessors as regular variables
+                    // because Closure Compiler doesn't properly analyze calls to
+                    // defineProperties() alone.
+                    // since there's no analysis, Closure assumes that getters/setters
+                    // have no side effects, which results in important get/set calls
+                    // being removed as dead code.
+                    // defining the accessors as variables first convinces Closure to
+                    // handle them more intelligently while not preventing them from
+                    // being real accessors.
+                    // Source: https://developers.google.com/closure/compiler/docs/limitations
+                    writeNewline();
+                    writeNewline();
+                    writeNewline();
+                    writeNewline("/**");
+                    if (p.preventRename)
+                        writeNewline(" * @nocollapse");
+                    if (p.resolvedExport && !p.suppressExport)
+                        writeNewline(" * @export");
+                    if (p.type != null)
+                        writeNewline(" * @type {" + JSGoogDocEmitter.convertASTypeToJSType(p.type.getBaseName(), p.type.getPackageName()) + "}"); 
+                    writeNewline(" */");
+                    write(getEmitter().formatQualifiedName(qname));
+                    write(ASEmitterTokens.MEMBER_ACCESS);
+                    if (p.uri != null)
+                    {
+                        IAccessorNode node = (getterNode != null) ? getterNode : setterNode;
+                        INamespaceDecorationNode ns = ((FunctionNode)node).getActualNamespaceNode();
+                        INamespaceDefinition nsDef = (INamespaceDefinition)ns.resolve(project);
+                        fjs.formatQualifiedName(nsDef.getQualifiedName()); // register with used names
+                        write(JSRoyaleEmitter.formatNamespacedProperty(p.uri, baseName, false));
+                    }
+                    else
+                        write(baseName);
+                    write(ASEmitterTokens.SEMICOLON);
+
+                    if (getterNode != null)
 	                {
 	                    writeNewline();
 	                    writeNewline();
@@ -611,12 +678,9 @@
                 ISetterNode setterNode = p.setter;
                 String baseName = p.name;
             	writeNewline("/**");
-                if (emitExports && !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)
 				{
@@ -692,7 +756,7 @@
         boolean suppress = getModel().suppressExports ||
 				(node.getASDocComment() != null &&
 				((ASDocComment)node.getASDocComment()).commentNoEnd().contains(JSRoyaleEmitterTokens.SUPPRESS_EXPORT.getToken()));
-       if (suppress) getModel().suppressedExportNodes.add(node);
+        if (suppress) getModel().suppressedExportNodes.add(node);
 				
         IDefinition def = node.getDefinition();
         ModifiersSet modifierSet = def.getModifiers();
@@ -712,6 +776,22 @@
 			//make sure the key includes the uri to avoid clashing with other equivalent base names
 			key =  uri + "::" + name;
 		}
+        boolean emitExports = true;
+        boolean exportProtected = false;
+        boolean exportInternal = false;
+        boolean preventRenamePublicSymbols = true;
+        boolean preventRenameProtectedSymbols = true;
+        boolean preventRenameInternalSymbols = true;
+        RoyaleJSProject project = (RoyaleJSProject) getWalker().getProject();
+        if (project != null && project.config != null)
+        {
+            emitExports = project.config.getExportPublicSymbols();
+            exportProtected = project.config.getExportProtectedSymbols();
+            exportInternal = project.config.getExportInternalSymbols();
+            preventRenamePublicSymbols = project.config.getPreventRenamePublicSymbols();
+            preventRenameProtectedSymbols = project.config.getPreventRenameProtectedSymbols();
+            preventRenameInternalSymbols = project.config.getPreventRenameInternalSymbols();
+        }
 		
 		PropertyNodes p = map.get(key);
         if (p == null)
@@ -719,16 +799,27 @@
             p = new PropertyNodes();
 			//track name and uri separately:
 			p.name = name;
+			p.originalName = node.getName();
 			p.uri = uri;
-			//resolvedExport is true if it is a custom namespace or one of a paired of accessor definitions is public
-			p.resolvedExport = uri != null || def.isPublic();
             map.put(key, p);
-        } else {
-			p.resolvedExport = p.resolvedExport || def.isPublic();
-		}
+        }
+        if(uri != null || def.isPublic())
+        {
+            p.resolvedExport = p.resolvedExport || emitExports;
+            p.preventRename = p.preventRename || preventRenamePublicSymbols;
+        }
+        else if(def.isInternal())
+        {
+            p.resolvedExport = p.resolvedExport || exportInternal;
+            p.preventRename = p.preventRename || preventRenameInternalSymbols;
+        }
+        else if(def.isProtected())
+        {
+            p.resolvedExport = p.resolvedExport || exportProtected;
+            p.preventRename = p.preventRename || preventRenameProtectedSymbols;
+        }
         p.getter = node;
 		if (!p.suppressExport) p.suppressExport = suppress;
-        ICompilerProject project = getWalker().getProject();
         if (p.type == null && project != null)
         	p.type = node.getDefinition().resolveReturnType(project);
         FunctionNode fn = (FunctionNode) node;
@@ -762,6 +853,22 @@
 			//make sure the key includes the uri to avoid clashing with other equivalent base names
 			key =  uri + "::" + name;
 		}
+        boolean emitExports = true;
+        boolean exportProtected = false;
+        boolean exportInternal = false;
+        boolean preventRenamePublicSymbols = true;
+        boolean preventRenameProtectedSymbols = true;
+        boolean preventRenameInternalSymbols = true;
+        RoyaleJSProject project = (RoyaleJSProject) getWalker().getProject();
+        if (project != null && project.config != null)
+        {
+            emitExports = project.config.getExportPublicSymbols();
+            exportProtected = project.config.getExportProtectedSymbols();
+            exportInternal = project.config.getExportInternalSymbols();
+            preventRenamePublicSymbols = project.config.getPreventRenamePublicSymbols();
+            preventRenameProtectedSymbols = project.config.getPreventRenameProtectedSymbols();
+            preventRenameInternalSymbols = project.config.getPreventRenameInternalSymbols();
+        }
 		
         PropertyNodes p = map.get(key);
         if (p == null)
@@ -769,16 +876,27 @@
             p = new PropertyNodes();
             //track name and uri separately:
             p.name = name;
+            p.originalName = node.getName();
             p.uri = uri;
- 			//resolvedExport is true if it is a custom namespace or one of a paired of accessor definitions is public
-            p.resolvedExport = uri != null || def.isPublic();
             map.put(key, p);
-        } else {
-			p.resolvedExport = p.resolvedExport || def.isPublic();
-		}
+        }
+        if(uri != null || def.isPublic())
+        {
+            p.resolvedExport = p.resolvedExport || emitExports;
+            p.preventRename = p.preventRename || preventRenamePublicSymbols;
+        }
+        else if(def.isInternal())
+        {
+            p.resolvedExport = p.resolvedExport || exportInternal;
+            p.preventRename = p.preventRename || preventRenameInternalSymbols;
+        }
+        else if(def.isProtected())
+        {
+            p.resolvedExport = p.resolvedExport || exportProtected;
+            p.preventRename = p.preventRename || preventRenameProtectedSymbols;
+        }
         p.setter = node;
         if (!p.suppressExport) p.suppressExport = suppress;
-        ICompilerProject project = (ICompilerProject)getWalker().getProject();
         if (p.type == null && project != null)
         {
         	IParameterDefinition[] params = def.getParameters();
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/BinaryOperatorEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/BinaryOperatorEmitter.java
index 2138d61..e5a1ab2 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/BinaryOperatorEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/BinaryOperatorEmitter.java
@@ -255,6 +255,15 @@
 	                    write(ASEmitterTokens.PAREN_CLOSE);
 	                    return;
                 	}
+                	else if (node.getNodeID() == ASTNodeID.Op_EqualID &&
+                			node.getRightOperandNode().getNodeID() == ASTNodeID.LiteralBooleanID)
+                	{
+                		getWalker().walk(xmlNode);
+                		write(" == '");
+	                    getWalker().walk(node.getRightOperandNode());
+                		write("'");
+                		return;
+                	}
                 }
                 else if (isDynamicAccess && ((JSRoyaleEmitter)getEmitter()).isXMLish((IExpressionNode)lnode))
                 {
@@ -601,6 +610,7 @@
 				else if (node.getNodeID() == ASTNodeID.Op_InID &&
 						((JSRoyaleEmitter)getEmitter()).isProxy(node.getRightOperandNode()))
 				{
+					//@todo: add loop target null safety (see changes in ForEachEmitter)
 					write(".propertyNames()");
 				}
 			}
@@ -693,6 +703,9 @@
     
     void specialCaseDate(IBinaryOperatorNode node, MemberAccessExpressionNode leftSide)
     {
+        if (ASNodeUtils.hasParenOpen(node))
+            write(ASEmitterTokens.PAREN_OPEN);
+
     	MemberAccessExpressionNode dateNode = (MemberAccessExpressionNode)leftSide;
         IIdentifierNode rightSide = (IIdentifierNode)dateNode.getRightOperandNode();
         String op = node.getOperator().getOperatorText();
@@ -735,5 +748,8 @@
         	write(ASEmitterTokens.SPACE);
 	        getWalker().walk(node.getRightOperandNode());
         }
+
+        if (ASNodeUtils.hasParenOpen(node))
+            write(ASEmitterTokens.PAREN_CLOSE);
     }
 }
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..3b1fa32 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);
@@ -422,7 +423,7 @@
                 + "var dispatcher = "
                 + qname
                 + ASEmitterTokens.MEMBER_ACCESS.getToken()
-                + BINDABLE_DISPATCHER_NAME
+                + STATIC_DISPATCHER_GETTER
                 + ASEmitterTokens.SEMICOLON.getToken());
         writeNewline(ASEmitterTokens.INDENT.getToken()
                 + ASEmitterTokens.INDENT.getToken()
@@ -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/js/jx/ClassEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/ClassEmitter.java
index 9b86e96..ca22de7 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/ClassEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/ClassEmitter.java
@@ -31,6 +31,7 @@
 import org.apache.royale.compiler.definitions.INamespaceDefinition;
 import org.apache.royale.compiler.internal.codegen.as.ASEmitterTokens;
 import org.apache.royale.compiler.internal.codegen.js.JSSubEmitter;
+import org.apache.royale.compiler.internal.codegen.js.goog.JSGoogEmitterTokens;
 import org.apache.royale.compiler.internal.codegen.js.royale.JSRoyaleDocEmitter;
 import org.apache.royale.compiler.internal.codegen.js.royale.JSRoyaleEmitter;
 import org.apache.royale.compiler.internal.codegen.js.royale.JSRoyaleEmitterTokens;
@@ -160,28 +161,6 @@
             }
         }
 
-  	    if (!getEmitter().getModel().isExterns && !suppressExport)
-  	    {
-  	        JSRoyaleDocEmitter doc = (JSRoyaleDocEmitter) getEmitter()
-  	        .getDocEmitter();
-  		    writeNewline();
-  		    writeNewline();
-  		    writeNewline();
-  		    doc.begin();
-  		    writeNewline(" * Prevent renaming of class. Needed for reflection.");
-  		    doc.end();
-  		    write(JSRoyaleEmitterTokens.GOOG_EXPORT_SYMBOL);
-  		    write(ASEmitterTokens.PAREN_OPEN);
-  		    write(ASEmitterTokens.SINGLE_QUOTE);
-  		    write(getEmitter().formatQualifiedName(node.getQualifiedName()));
-  		    write(ASEmitterTokens.SINGLE_QUOTE);
-  		    write(ASEmitterTokens.COMMA);
-  		    write(ASEmitterTokens.SPACE);
-  		    write(getEmitter().formatQualifiedName(node.getQualifiedName()));
-  		    write(ASEmitterTokens.PAREN_CLOSE);
-  		    write(ASEmitterTokens.SEMICOLON);
-  	    }
-
         IDefinitionNode[] dnodes = node.getAllMemberNodes();
         for (IDefinitionNode dnode : dnodes)
         {
@@ -271,6 +250,7 @@
     
     public void emitComplexInitializers(IClassNode node)
     {
+        boolean wroteSelf = false;
     	boolean wroteOne = false;
         IDefinitionNode[] dnodes = node.getAllMemberNodes();
         for (IDefinitionNode dnode : dnodes)
@@ -281,6 +261,16 @@
                 IExpressionNode vnode = varnode.getAssignedValueNode();
                 if (vnode != null && (!(dnode.getDefinition().isStatic() || EmitterUtils.isScalar(vnode))))
                 {
+                    if(!wroteSelf && vnode instanceof IFunctionObjectNode)
+                    {
+                        writeNewline();
+                        writeToken(ASEmitterTokens.VAR);
+                        writeToken(JSGoogEmitterTokens.SELF);
+                        writeToken(ASEmitterTokens.EQUAL);
+                        write(ASEmitterTokens.THIS);
+                        writeNewline(ASEmitterTokens.SEMICOLON);
+                        wroteSelf = true;
+                    }
                     writeNewline();
                     write(ASEmitterTokens.THIS);
                     write(ASEmitterTokens.MEMBER_ACCESS);
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/FieldEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/FieldEmitter.java
index 7e81916..d21aca8 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/FieldEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/FieldEmitter.java
@@ -36,16 +36,10 @@
 import org.apache.royale.compiler.internal.codegen.js.utils.EmitterUtils;
 import org.apache.royale.compiler.internal.definitions.FunctionDefinition;
 import org.apache.royale.compiler.internal.projects.RoyaleJSProject;
-import org.apache.royale.compiler.internal.tree.as.ChainedVariableNode;
-import org.apache.royale.compiler.internal.tree.as.FunctionCallNode;
-import org.apache.royale.compiler.internal.tree.as.IdentifierNode;
-import org.apache.royale.compiler.internal.tree.as.VariableNode;
+import org.apache.royale.compiler.internal.tree.as.*;
 import org.apache.royale.compiler.projects.ICompilerProject;
 import org.apache.royale.compiler.tree.ASTNodeID;
-import org.apache.royale.compiler.tree.as.IASNode;
-import org.apache.royale.compiler.tree.as.IExpressionNode;
-import org.apache.royale.compiler.tree.as.INamespaceDecorationNode;
-import org.apache.royale.compiler.tree.as.IVariableNode;
+import org.apache.royale.compiler.tree.as.*;
 import org.apache.royale.compiler.tree.metadata.IMetaTagNode;
 import org.apache.royale.compiler.tree.metadata.IMetaTagsNode;
 import org.apache.royale.compiler.utils.NativeUtils;
@@ -92,6 +86,8 @@
     		if (def != null)
     		{
     			qname = def.getQualifiedName();
+                if (NativeUtils.isJSNative(qname))
+                    return false;
     			return !(qname.contentEquals(cdef.getQualifiedName()));
     		}
     	}
@@ -104,6 +100,9 @@
     			if (isExternalReference((IExpressionNode)childNode, cdef))
     				return true;
     		}
+    		//if  childNode is a ContainerNode (e.g. argumentsNode of FunctionCallNode),
+            //should we be checking the arguments as well? Doing so (*and* returning true because one of the argument nodes is an external reference)
+            //seems to cause issues, so avoiding this for now.
     	}
     	return false;
     }
@@ -183,18 +182,18 @@
                 writeNewline(ASEmitterTokens.SEMICOLON);
                 write(IASLanguageConstants.Object);
                 write(ASEmitterTokens.MEMBER_ACCESS);
-                write(JSEmitterTokens.DEFINE_PROPERTY);
+                write(JSEmitterTokens.DEFINE_PROPERTIES);
                 write(ASEmitterTokens.PAREN_OPEN);
                 write(className);
                 writeToken(ASEmitterTokens.COMMA);
-                write(ASEmitterTokens.SINGLE_QUOTE);
+                writeToken(ASEmitterTokens.BLOCK_OPEN);
 	            writeFieldName(node, fjs);
-                write(ASEmitterTokens.SINGLE_QUOTE);
-                writeToken(ASEmitterTokens.COMMA);
+                writeToken(ASEmitterTokens.COLON);
                 if (node.isConst())
                 	write("{ value: value, writable: false }");
                 else
-                	write("{ value: value, writable: true }");
+                    write("{ value: value, writable: true }");
+                write(ASEmitterTokens.BLOCK_CLOSE);
                 write(ASEmitterTokens.PAREN_CLOSE);
                 writeNewline(ASEmitterTokens.SEMICOLON);
                 writeToken(ASEmitterTokens.RETURN);
@@ -217,15 +216,15 @@
 	                writeNewline(ASEmitterTokens.BLOCK_OPEN, true);
 	                write(IASLanguageConstants.Object);
 	                write(ASEmitterTokens.MEMBER_ACCESS);
-	                write(JSEmitterTokens.DEFINE_PROPERTY);
+	                write(JSEmitterTokens.DEFINE_PROPERTIES);
 	                write(ASEmitterTokens.PAREN_OPEN);
 	                write(className);
 	                writeToken(ASEmitterTokens.COMMA);
-	                write(ASEmitterTokens.SINGLE_QUOTE);
+                    writeToken(ASEmitterTokens.BLOCK_OPEN);
 		            writeFieldName(node, fjs);
-	                write(ASEmitterTokens.SINGLE_QUOTE);
-	                writeToken(ASEmitterTokens.COMMA);
+	                writeToken(ASEmitterTokens.COLON);
 	                write("{ value: value, writable: true }");
+                    write(ASEmitterTokens.BLOCK_CLOSE);
 	                write(ASEmitterTokens.PAREN_CLOSE);
 	                indentPop();
 	                writeNewline(ASEmitterTokens.SEMICOLON);
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/ForEachEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/ForEachEmitter.java
index 4920604..071a481 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/ForEachEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/ForEachEmitter.java
@@ -22,17 +22,18 @@
 import org.apache.royale.compiler.codegen.ISubEmitter;
 import org.apache.royale.compiler.codegen.js.IJSEmitter;
 import org.apache.royale.compiler.constants.IASLanguageConstants;
+import org.apache.royale.compiler.definitions.IClassDefinition;
 import org.apache.royale.compiler.definitions.IDefinition;
 import org.apache.royale.compiler.definitions.IFunctionDefinition;
 import org.apache.royale.compiler.internal.codegen.as.ASEmitterTokens;
 import org.apache.royale.compiler.internal.codegen.js.JSSubEmitter;
 import org.apache.royale.compiler.internal.codegen.js.royale.JSRoyaleEmitter;
 import org.apache.royale.compiler.internal.codegen.js.utils.EmitterUtils;
+import org.apache.royale.compiler.internal.projects.RoyaleProject;
 import org.apache.royale.compiler.internal.semantics.SemanticUtils;
 import org.apache.royale.compiler.internal.tree.as.FunctionCallNode;
 import org.apache.royale.compiler.internal.tree.as.IdentifierNode;
 import org.apache.royale.compiler.internal.tree.as.LabeledStatementNode;
-import org.apache.royale.compiler.internal.tree.as.MemberAccessExpressionNode;
 import org.apache.royale.compiler.scopes.IDefinitionSet;
 import org.apache.royale.compiler.tree.ASTNodeID;
 import org.apache.royale.compiler.tree.as.*;
@@ -111,7 +112,7 @@
         	}
             if (((JSRoyaleEmitter)getEmitter()).isProxy((IdentifierNode)obj))
             {
-                write(".propertyNames()");
+                emitNullSafeProxyTarget(targetName);
                 isProxy = true;
             }
         }
@@ -133,8 +134,8 @@
             }
             if (((JSRoyaleEmitter)getEmitter()).isProxy((IMemberAccessExpressionNode)obj))
             {
-                write(".propertyNames()");
-                isXML = true;
+                emitNullSafeProxyTarget(targetName);
+                isProxy = true;
             }
         }
         else if (obj.getNodeID() == ASTNodeID.Op_AsID)
@@ -147,7 +148,17 @@
         		{
                     write(".elementNames()");
                     isXML = true;
-        		}
+        		} else {
+                    IClassDefinition asTarget = (IClassDefinition) ((IdentifierNode) asChild).resolve(getProject());
+                    if (asTarget != null) {
+                        //check ancestry for proxy
+                        RoyaleProject project = (RoyaleProject) getProject();
+                        if (asTarget.isInstanceOf(project.getProxyBaseClass(), project)){
+                            emitNullSafeProxyTarget(targetName);
+                            isProxy = true;
+                        }
+                    }
+                }
         	}
         }
         else if (obj.getNodeID() == ASTNodeID.FunctionCallID)
@@ -161,7 +172,23 @@
         		{
                     write(".elementNames()");
                     isXML = true;
-        		}        		
+        		} else {
+        		    IDefinition funcNameDef = funcName.resolve(getProject());
+                    //if it is IClassDefinition, then it is a type cast, otherwise...
+        		    if (funcNameDef instanceof IFunctionDefinition) {
+                        //then it is a regular function call, so check the return type, and use that for the IClassDefinition type check:
+                        funcNameDef = ((IFunctionDefinition)funcNameDef).resolveReturnType(getProject());
+                    }
+        		    if (funcNameDef instanceof IClassDefinition) {
+        		        //this is a a hard cast
+                        //check ancestry for proxy
+                        RoyaleProject project = (RoyaleProject) getProject();
+                        if (((IClassDefinition) funcNameDef).isInstanceOf(project.getProxyBaseClass(), project)){
+                            emitNullSafeProxyTarget(targetName);
+                            isProxy = true;
+                        }
+                    }
+                }
         	} else if (funcName instanceof IMemberAccessExpressionNode) {
                 IFunctionDefinition funcDef = (IFunctionDefinition) ((IMemberAccessExpressionNode) funcName).getRightOperandNode().resolve(getProject());
                 if (funcDef == null) {
@@ -196,7 +223,16 @@
                     // It is probably rare and ill-advised, but it definitely won't work well in javascript currently for those classes, for example.
 
                 } else {
-                    isXML = SemanticUtils.isXMLish(funcDef.resolveReturnType(getProject()), getProject());
+                    IClassDefinition returnType = (IClassDefinition) funcDef.resolveReturnType(getProject());
+                    isXML = SemanticUtils.isXMLish(returnType, getProject());
+                    if (!isXML) {
+                        //check for Proxy
+                        RoyaleProject project = (RoyaleProject) getProject();
+                        if (returnType.isInstanceOf(project.getProxyBaseClass(), project)){
+                            emitNullSafeProxyTarget(targetName);
+                            isProxy = true;
+                        }
+                    }
                 }
                 if (isXML) {
                     write(".elementNames()");
@@ -260,4 +296,25 @@
         writeNewline();
     }
 
+    void emitNullSafeProxyTarget(String targetName) {
+        //output the null-safe target expression:
+        // for something:Object in targetName && targetName.propertyNames()
+        write(ASEmitterTokens.SPACE);
+        writeToken(ASEmitterTokens.LOGICAL_AND);
+        write(targetName);
+        write(".propertyNames()");
+    }
+
+    //@todo, check XML also at some point, maybe switch to the following
+    /*
+    void emitNullSafeXMLishTarget(String targetName) {
+        //output the null-safe target expression:
+        // for something:Object in targetName && targetName.propertyNames()
+        write(ASEmitterTokens.SPACE);
+        writeToken(ASEmitterTokens.LOGICAL_AND);
+        write(targetName);
+        write(".elementNames()");
+    }
+    */
+
 }
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/ForLoopEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/ForLoopEmitter.java
index febe699..21ee8d9 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/ForLoopEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/ForLoopEmitter.java
@@ -39,7 +39,7 @@
     @Override
     public void emit(IForLoopNode node)
     {
-        IContainerNode xnode = (IContainerNode) node.getChild(1);
+        IContainerNode statementContentsNode = (IContainerNode) node.getStatementContentsNode();
 
         startMapping(node);
         writeToken(ASEmitterTokens.FOR);
@@ -60,11 +60,22 @@
 
         startMapping(node, cnode);
         write(ASEmitterTokens.PAREN_CLOSE);
-        if (!EmitterUtils.isImplicit(xnode))
+        if (!EmitterUtils.isImplicit(statementContentsNode))
             write(ASEmitterTokens.SPACE);
         endMapping(node);
+        //if we have a for loop that has no body, then emit it with an explicit 'empty block'.
+        //Otherwise the loop body will be considered to be the following statement
+        //the empty block is to avoid this from GCC: "WARNING - If this if/for/while really shouldn't have a body, use {}"
+        if (EmitterUtils.isImplicit(statementContentsNode)
+                && statementContentsNode.getChildCount() == 0) {
+            write(ASEmitterTokens.SPACE);
+            write(ASEmitterTokens.BLOCK_OPEN);
+            write(ASEmitterTokens.BLOCK_CLOSE);
+            writeToken(ASEmitterTokens.SEMICOLON);
+        } else {
+            getWalker().walk(statementContentsNode);
+        }
 
-        getWalker().walk(node.getStatementContentsNode());
     }
 
     protected void emitForStatements(IContainerNode node)
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/FunctionCallEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/FunctionCallEmitter.java
index f4e711b..f15b440 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/FunctionCallEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/FunctionCallEmitter.java
@@ -42,6 +42,7 @@
 import org.apache.royale.compiler.problems.TooFewFunctionParametersProblem;
 import org.apache.royale.compiler.problems.TooManyFunctionParametersProblem;
 import org.apache.royale.compiler.projects.ICompilerProject;
+import org.apache.royale.compiler.scopes.IFileScope;
 import org.apache.royale.compiler.tree.ASTNodeID;
 import org.apache.royale.compiler.tree.as.*;
 import org.apache.royale.compiler.utils.NativeUtils;
@@ -666,7 +667,28 @@
                     write(ASEmitterTokens.PAREN_CLOSE);
                     return;
                 }
-            	getWalker().walk(node.getNameNode());
+
+            	if (def != null
+                        && node.getNameNode() instanceof IMemberAccessExpressionNode
+                        && def.getContainingScope() instanceof IFileScope) {
+                    //this code branch covers a scenario where fully qualified imported functions had their package elements
+                    //swapped to dynamic-access when js-dynamic-access-unknown-members=true, which should not happen.
+                    //This was observed when the imported function call was being used 'fully qualified' inside
+                    //a locally defined function with the same name (where fully qualified access was of course needed)
+                    //example:
+                    // import org.apache.royale.test.asserts.assertTrue; //import original function
+                    //
+                    //  public function assertTrue(message:String, condition:Boolean):void{
+                    //    org.apache.royale.test.asserts.assertTrue(condition,message); // without this branch in the compiler it was being expressed as org["apache"]["royale"]...etc
+                    //  }
+
+            	    startMapping(node.getNameNode());
+            	    write(def.getQualifiedName());
+            	    endMapping(node.getNameNode());
+                } else {
+                    getWalker().walk(node.getNameNode());
+                }
+
 
                 getEmitter().emitArguments(node.getArgumentsNode());
     
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/IdentifierEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/IdentifierEmitter.java
index 00f82b9..b97aa7f 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/IdentifierEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/IdentifierEmitter.java
@@ -92,7 +92,9 @@
                 startMapping(parentNode);
                 if(initialValue instanceof String)
                 {
-                    write("\"" + initialValue + "\"");
+                    write(ASEmitterTokens.DOUBLE_QUOTE);
+                    write((String) initialValue);
+                    write(ASEmitterTokens.DOUBLE_QUOTE);
                 }
                 else if(initialValue == ABCConstants.UNDEFINED_VALUE)
                 {
@@ -158,7 +160,7 @@
             	if (baseName.equals("MAX_VALUE"))
             	{
                     startMapping(parentNode);
-            		write("2147483648");
+            		write("2147483647");
                     endMapping(parentNode);
             		return;
             	}
@@ -205,7 +207,7 @@
                     endMapping(prevSibling);
                     startMapping(parentNode, prevSibling);
                 }
-                if (!isCustomNamespace && (!(identifierIsAccessorFunction && isStatic))) {
+                if (!isCustomNamespace) {
                     write(ASEmitterTokens.MEMBER_ACCESS);
                     wroteMemberAccess = true;
                 }
@@ -356,10 +358,6 @@
                     	String ns = ((INamespaceResolvedReference)(nodeDef.getNamespaceReference())).resolveAETNamespace(getProject()).getName();
                     	write(JSRoyaleEmitter.formatNamespacedProperty(ns, qname, accessWithNS));
                     }
-                    else if (identifierIsAccessorFunction && isStatic)
-                    {
-                    	write("[\"" +node.getName() + "\"]");
-                    }
                 	else
                 	{
                 	    if (!(nodeDef.getParent() instanceof IPackageDefinition)) {
@@ -390,10 +388,6 @@
                 	String ns = ((INamespaceResolvedReference)nodeDef.getNamespaceReference()).resolveAETNamespace(getProject()).getName();
                 	write(JSRoyaleEmitter.formatNamespacedProperty(ns, qname, accessWithNS));
                 }
-                else if (identifierIsAccessorFunction && isStatic)
-                {
-                	write("[\"" + qname + "\"]");
-                }
                 else
                 {
                 	if (nodeDef != null && !isStatic && (nodeDef.getParent() instanceof ClassDefinition) && (!(nodeDef instanceof IParameterDefinition)) && nodeDef.isPrivate() && getProject().getAllowPrivateNameConflicts())
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/InterfaceEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/InterfaceEmitter.java
index eb8f079..67db88c 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/InterfaceEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/InterfaceEmitter.java
@@ -74,27 +74,7 @@
             write(ASEmitterTokens.SEMICOLON);
         }
 
-        JSRoyaleDocEmitter doc = (JSRoyaleDocEmitter) getEmitter()
-        .getDocEmitter();
-  	    if (!getEmitter().getModel().isExterns)
-  	    {
-  		    writeNewline();
-  		    writeNewline();
-  		    writeNewline();
-  		    doc.begin();
-  		    writeNewline(" * Prevent renaming of class. Needed for reflection.");
-  		    doc.end();
-  		    write(JSRoyaleEmitterTokens.GOOG_EXPORT_SYMBOL);
-  		    write(ASEmitterTokens.PAREN_OPEN);
-  		    write(ASEmitterTokens.SINGLE_QUOTE);
-  		    write(getEmitter().formatQualifiedName(node.getQualifiedName()));
-  		    write(ASEmitterTokens.SINGLE_QUOTE);
-  		    write(ASEmitterTokens.COMMA);
-  		    write(ASEmitterTokens.SPACE);
-  		    write(getEmitter().formatQualifiedName(node.getQualifiedName()));
-  		    write(ASEmitterTokens.PAREN_CLOSE);
-  		    write(ASEmitterTokens.SEMICOLON);
-  	    }
+        JSRoyaleDocEmitter doc = (JSRoyaleDocEmitter) getEmitter().getDocEmitter();
   	    
         final IDefinitionNode[] members = node.getAllMemberDefinitionNodes();
         for (IDefinitionNode mnode : members)
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/MemberAccessEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/MemberAccessEmitter.java
index 274cd4f..fdb18a3 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/MemberAccessEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/MemberAccessEmitter.java
@@ -265,21 +265,33 @@
 	        	{
 	        		writeLeftSide(node, leftNode, rightNode);
 	        		if (child)
-	        			write(".getProperty('");
+	        			write(".getProperty(");
 	        		String s = fjs.stringifyNode(rightNode);
 	        		int dot = s.indexOf('.');
 	        		if (dot != -1)
 	        		{
 	        			String name = s.substring(0, dot);
 	        			String afterDot = s.substring(dot);
+	        			write("'");
 	        			write(name);
-	        			write("')");
+	        			write("'");
+	        			write(")");
 	        			write(afterDot);
 	        		}
 	        		else
 	        		{
-	        			write(s);
-	        			write("')");
+	        			if ((s.startsWith("'") && s.endsWith("'")) || (s.startsWith("\"") && s.endsWith("\"")))
+	        			{
+	        				// already quoted
+		        			write(s);
+		        		}
+		        		else
+		        		{
+		        			write("'");
+		        			write(s);
+		        			write("'");
+		        		}
+	        			write(")");
 	        		}
 	        		return;
 	        	}
@@ -563,37 +575,45 @@
             {
                 getWalker().walk(node.getLeftOperandNode());
             }
-            else if (leftNode.getNodeID() == ASTNodeID.SuperID
-                    && (rightNode.getNodeID() == ASTNodeID.GetterID || (rightDef != null && rightDef instanceof AccessorDefinition)))
-            {
-                write(getEmitter().formatQualifiedName(
-                        getEmitter().getModel().getCurrentClass().getQualifiedName()));
-                write(ASEmitterTokens.MEMBER_ACCESS);
-                write(JSGoogEmitterTokens.SUPERCLASS);
-                write(ASEmitterTokens.MEMBER_ACCESS);
-                write(JSRoyaleEmitterTokens.GETTER_PREFIX);
-                if (rightDef != null)
-                    write(rightDef.getBaseName());
-                else
-                    write(((GetterNode) rightNode).getName());
-                write(ASEmitterTokens.MEMBER_ACCESS);
-                write(JSEmitterTokens.APPLY);
-                write(ASEmitterTokens.PAREN_OPEN);
-                write(ASEmitterTokens.THIS);
-                write(ASEmitterTokens.PAREN_CLOSE);
-                return false;
-            }
-            else if (leftNode.getNodeID() == ASTNodeID.SuperID
-                    && (rightDef != null && rightDef instanceof FunctionDefinition))
-            {
-                write(getEmitter().formatQualifiedName(
-                        getEmitter().getModel().getCurrentClass().getQualifiedName()));
-                write(ASEmitterTokens.MEMBER_ACCESS);
-                write(JSGoogEmitterTokens.SUPERCLASS);
-                write(ASEmitterTokens.MEMBER_ACCESS);
-                write(rightDef.getBaseName());
-                return false;
-            }
+            else
+			{
+				if (rightNode.getNodeID() == ASTNodeID.GetterID || (rightDef != null && rightDef instanceof AccessorDefinition))
+				{
+					write(getEmitter().formatQualifiedName(
+							getEmitter().getModel().getCurrentClass().getQualifiedName()));
+					write(ASEmitterTokens.MEMBER_ACCESS);
+					write(JSGoogEmitterTokens.SUPERCLASS);
+					write(ASEmitterTokens.MEMBER_ACCESS);
+					write(JSRoyaleEmitterTokens.GETTER_PREFIX);
+					if (rightDef != null)
+						write(rightDef.getBaseName());
+					else
+						write(((GetterNode) rightNode).getName());
+					write(ASEmitterTokens.MEMBER_ACCESS);
+					write(JSEmitterTokens.APPLY);
+					write(ASEmitterTokens.PAREN_OPEN);
+					write(ASEmitterTokens.THIS);
+					write(ASEmitterTokens.PAREN_CLOSE);
+					return false;
+				}
+				else if (rightDef != null && rightDef instanceof FunctionDefinition)
+				{
+					write(getEmitter().formatQualifiedName(
+							getEmitter().getModel().getCurrentClass().getQualifiedName()));
+					write(ASEmitterTokens.MEMBER_ACCESS);
+					write(JSGoogEmitterTokens.SUPERCLASS);
+					write(ASEmitterTokens.MEMBER_ACCESS);
+					write(rightDef.getBaseName());
+					return false;
+				}
+				else if (rightDef != null && rightDef instanceof VariableDefinition)
+				{
+					//for variables, replace super with this
+					startMapping(leftNode);
+					write(ASEmitterTokens.THIS);
+					endMapping(leftNode);
+				}
+			}
         }
         else
         {
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/PackageFooterEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/PackageFooterEmitter.java
index 1e54271..64edb13 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/PackageFooterEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/PackageFooterEmitter.java
@@ -79,7 +79,7 @@
         JSRoyaleDocEmitter doc = (JSRoyaleDocEmitter) getEmitter()
         .getDocEmitter();
 
-	    if (!getEmitter().getModel().isExterns && doc.getEmitExports())
+	    if (!getEmitter().getModel().isExterns && !getEmitter().getModel().suppressExports)
 	    {
 			boolean isInterface = tnode instanceof IInterfaceNode;
 			boolean isDynamic = tnode instanceof IClassNode && tnode.hasModifier(ASModifier.DYNAMIC);
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/WhileLoopEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/WhileLoopEmitter.java
index 2bd7da3..7fc27a6 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/WhileLoopEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/WhileLoopEmitter.java
@@ -39,7 +39,6 @@
     @Override
     public void emit(IWhileLoopNode node)
     {
-        IContainerNode cnode = (IContainerNode) node.getChild(1);
 
         startMapping(node);
         writeToken(ASEmitterTokens.WHILE);
@@ -49,13 +48,23 @@
         IASNode conditionalExpression = node.getConditionalExpressionNode();
         getWalker().walk(conditionalExpression);
 
-        IASNode statementContentsNode = node.getStatementContentsNode();
+        IContainerNode statementContentsNode = (IContainerNode) node.getStatementContentsNode();
         startMapping(node, conditionalExpression);
         write(ASEmitterTokens.PAREN_CLOSE);
-        if (!EmitterUtils.isImplicit(cnode))
+        if (!EmitterUtils.isImplicit(statementContentsNode))
             write(ASEmitterTokens.SPACE);
         endMapping(node);
-
-        getWalker().walk(statementContentsNode);
+        //if we have a while loop that has no body, then emit it with an explicit 'empty block'.
+        //Otherwise the loop body will be considered to be the following statement
+        //the empty block is to avoid this from GCC: "WARNING - If this if/for/while really shouldn't have a body, use {}"
+        if (EmitterUtils.isImplicit(statementContentsNode)
+                && statementContentsNode.getChildCount() == 0) {
+            write(ASEmitterTokens.SPACE);
+            write(ASEmitterTokens.BLOCK_OPEN);
+            write(ASEmitterTokens.BLOCK_CLOSE);
+            writeToken(ASEmitterTokens.SEMICOLON);
+        } else {
+            getWalker().walk(statementContentsNode);
+        }
     }
 }
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleASDocEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleASDocEmitter.java
index 1f4142c..1d013b5 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleASDocEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleASDocEmitter.java
@@ -41,6 +41,7 @@
 import org.apache.royale.compiler.definitions.IDefinition;
 import org.apache.royale.compiler.definitions.IPackageDefinition;
 import org.apache.royale.compiler.definitions.IParameterDefinition;
+import org.apache.royale.compiler.definitions.ITypeDefinition;
 import org.apache.royale.compiler.definitions.metadata.IDeprecationInfo;
 import org.apache.royale.compiler.definitions.references.INamespaceReference;
 import org.apache.royale.compiler.internal.codegen.js.goog.JSGoogEmitter;
@@ -592,9 +593,17 @@
         }
         write("  \"return\": \"");
         if (node.getReturnType().equals("void"))
+		{
         	write("void");
+		}
         else if (node.getReturnTypeNode() != null)
-        	write(formatQualifiedName(node.getReturnTypeNode().resolveType(getWalker().getProject()).getQualifiedName()));
+		{
+			ITypeDefinition returnDef = node.getReturnTypeNode().resolveType(getWalker().getProject());
+			if (returnDef != null)
+			{
+        		write(formatQualifiedName(returnDef.getQualifiedName()));
+			}
+		}
         writeNewline("\",");
         write("  \"params\": [");
         boolean firstParam = true;
@@ -607,9 +616,11 @@
     		write("{ \"name\": \"");
     		write(param.getBaseName());
     		write("\", \"type\": \"");
-    		if (param.getTypeReference() != null)
-    			write(formatQualifiedName(param.getTypeReference().resolve(getWalker().getProject(), 
-    					node.getContainingScope().getScope(), DependencyType.SIGNATURE, false).getQualifiedName()));
+			ITypeDefinition paramDef = param.resolveType(getWalker().getProject());
+    		if (paramDef != null)
+			{
+    			write(formatQualifiedName(paramDef.getQualifiedName()));
+			}
             write("\"}");    		
     	}
     	write("]");
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleBasicMXMLDescriptorEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleBasicMXMLDescriptorEmitter.java
new file mode 100644
index 0000000..934569b
--- /dev/null
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleBasicMXMLDescriptorEmitter.java
@@ -0,0 +1,348 @@
+/*
+ *
+ *  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.internal.codegen.js.royale;
+
+import org.apache.royale.compiler.codegen.ISubEmitter;
+import org.apache.royale.compiler.codegen.mxml.js.IMXMLJSEmitter;
+import org.apache.royale.compiler.internal.codegen.as.ASEmitterTokens;
+import org.apache.royale.compiler.internal.codegen.js.goog.JSGoogEmitterTokens;
+import org.apache.royale.compiler.internal.codegen.mxml.MXMLSubEmitter;
+import org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLDescriptorSpecifier;
+import org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLEventSpecifier;
+import org.apache.royale.compiler.internal.projects.RoyaleJSProject;
+
+public class JSRoyaleBasicMXMLDescriptorEmitter extends MXMLSubEmitter implements ISubEmitter<MXMLDescriptorSpecifier>
+{
+    private boolean useGoogReflectObjectProperty = false;
+
+    public JSRoyaleBasicMXMLDescriptorEmitter(IMXMLJSEmitter emitter)
+    {
+        super(emitter);
+    }
+
+    @Override
+    public void emit(MXMLDescriptorSpecifier root)
+    {
+        RoyaleJSProject project = (RoyaleJSProject) getMXMLWalker().getProject();
+        useGoogReflectObjectProperty = project.config != null && project.config.getMxmlReflectObjectProperty();
+		outputDescriptorSpecifier(root, true);
+	}
+
+    //---------------------------------
+    //    writeSimpleDescriptor
+    //---------------------------------
+
+    protected void writeSimpleDescriptor(String name, String type, String value,
+            boolean writeNewline)
+    {
+        write(ASEmitterTokens.SINGLE_QUOTE);
+        write(name);
+        write(ASEmitterTokens.SINGLE_QUOTE);
+        writeDelimiter(writeNewline);
+
+        if (type != null)
+        {
+            write(type);
+            writeDelimiter(writeNewline);
+        }
+
+        write(value);
+    }
+
+    //---------------------------------
+    //    writeDelimiter
+    //---------------------------------
+
+    protected void writeDelimiter(boolean writeNewline)
+    {
+        if (writeNewline)
+            writeNewline(ASEmitterTokens.COMMA);
+        else
+            writeToken(ASEmitterTokens.COMMA);
+	}
+
+    //---------------------------------
+    //    outputDescriptorSpecifier
+    //---------------------------------
+
+	private void outputDescriptorSpecifier(MXMLDescriptorSpecifier root, boolean writeNewline)
+    {
+        if (root.isTopNode)
+        {
+            int count = 0;
+            for (MXMLDescriptorSpecifier md : root.propertySpecifiers)
+            {
+                if (md.name != null)
+                    count++;
+            }
+
+            write(count + "");
+            writeNewline(ASEmitterTokens.COMMA);
+        }
+
+		outputPropertySpecifiers(root, writeNewline);
+
+        if (!root.isProperty)
+        {
+            outputStyleSpecifiers(root, writeNewline);
+
+            // TODO (erikdebruin) not yet implemented in Royale
+            //outputEffectSpecifiers(writeNewline);
+
+            outputEventSpecifiers(root, writeNewline);
+
+            if (!root.isTopNode)
+            {
+                writeDelimiter(writeNewline);
+
+                if (root.childrenSpecifier == null)
+                    write(ASEmitterTokens.NULL);
+                else
+                    outputChildren(root.childrenSpecifier, writeNewline);
+            }
+
+            boolean isLastChild = root.parent != null
+                    && root.parent.propertySpecifiers.indexOf(root) == root.parent.propertySpecifiers
+                            .size() - 1;
+
+            if (!isLastChild && !root.isTopNode)
+                writeDelimiter(writeNewline);
+        }
+    }
+
+    //---------------------------------
+    //    outputPropertySpecifiers
+    //---------------------------------
+	
+	private void outputPropertySpecifiers(MXMLDescriptorSpecifier root, boolean writeNewline)
+	{
+        MXMLDescriptorSpecifier model = null; // model goes first
+        MXMLDescriptorSpecifier beads = null; // beads go last
+
+        for (MXMLDescriptorSpecifier md : root.propertySpecifiers)
+        {
+            if (md.name != null && md.name.equals("model"))
+            {
+                model = md;
+                break;
+            }
+        }
+
+        if (model != null)
+        {
+            outputPropertySpecifier(model, writeNewline);
+        }
+
+        for (MXMLDescriptorSpecifier md : root.propertySpecifiers)
+        {
+            if (md.name != null)
+            {
+                if (!md.name.equals("model") && !md.name.equals("beads"))
+                    outputPropertySpecifier(md, writeNewline);
+                else if (md.name.equals("beads"))
+                    beads = md;
+            }
+        }
+
+        if (beads != null)
+        {
+            outputPropertySpecifier(beads, writeNewline);
+        }
+	}
+
+    //---------------------------------
+    //    outputEventSpecifiers
+    //---------------------------------
+
+    private void outputEventSpecifiers(MXMLDescriptorSpecifier root, boolean writeNewline)
+    {
+        // number of events
+        int count = 0;
+        for (MXMLEventSpecifier me : root.eventSpecifiers)
+        {
+            if (me.name != null)
+                count++;
+        }
+        write(count + "");
+
+        for (MXMLEventSpecifier me : root.eventSpecifiers)
+        {
+			writeDelimiter(writeNewline);
+			outputEventSpecifier(me, writeNewline);
+        }
+    }
+
+    //---------------------------------
+    //    outputStyleSpecifiers
+    //---------------------------------
+
+    private void outputStyleSpecifiers(MXMLDescriptorSpecifier root, boolean writeNewline)
+    {
+        // TODO (erikdebruin) not yet implemented in Royale
+
+        write("0");
+        writeDelimiter(writeNewline);
+    }
+
+    //---------------------------------
+    //    outputPropertySpecifier
+    //---------------------------------
+
+    private void outputPropertySpecifier(MXMLDescriptorSpecifier specifier, boolean writeNewline)
+    {
+        if(specifier.isProperty)
+        {
+            if(useGoogReflectObjectProperty)
+            {
+                write(JSGoogEmitterTokens.GOOG_REFLECT_OBJECTPROPERTY);
+                write(ASEmitterTokens.PAREN_OPEN);
+            }
+            write(ASEmitterTokens.SINGLE_QUOTE);
+            write(specifier.name);
+            write(ASEmitterTokens.SINGLE_QUOTE);
+            if(useGoogReflectObjectProperty)
+            {
+                MXMLDescriptorSpecifier parentSpecifier = specifier.parent;
+                String id = (parentSpecifier.id != null) ? parentSpecifier.id : parentSpecifier.effectiveId;
+                write(ASEmitterTokens.COMMA);
+                write(ASEmitterTokens.SPACE);
+                write(ASEmitterTokens.THIS);
+                if (id != null)
+                {
+                    write(ASEmitterTokens.MEMBER_ACCESS);
+                    write(id);
+                }
+                write(ASEmitterTokens.PAREN_CLOSE);
+            }
+        }
+        else
+        {
+            write(specifier.name);
+        }
+        writeDelimiter(writeNewline);
+
+        if (specifier.isProperty)
+        {
+            if (specifier.value != null)
+            {
+                write(ASEmitterTokens.TRUE);
+                writeDelimiter(writeNewline);
+                // need to do other escaping here?
+                // restrict="0-9.\"
+                if (specifier.value.endsWith("\\'") && !specifier.value.endsWith("\\\\'"))
+                {
+                	specifier.value = specifier.value.substring(0, specifier.value.length() - 1) + "\\'";
+                }
+                write(specifier.value);
+            }
+            else
+            {
+                write((specifier.hasArray) ? ASEmitterTokens.NULL : ASEmitterTokens.FALSE);
+                writeDelimiter(writeNewline);
+                write(ASEmitterTokens.SQUARE_OPEN);
+                indentPush();
+                writeNewline();
+                outputDescriptorSpecifier(specifier, writeNewline);
+                indentPop();
+                writeNewline();
+                write(ASEmitterTokens.SQUARE_CLOSE);
+            }
+
+            if (specifier.parent != null)
+                writeDelimiter(writeNewline);
+        }
+        else
+        {
+            for (MXMLDescriptorSpecifier md : specifier.propertySpecifiers)
+            {
+                if (md.name != null && md.name.equals("mxmlContent"))
+                {
+                    specifier.childrenSpecifier = md;
+                    specifier.propertySpecifiers.remove(md);
+                    break;
+                }
+            }
+
+            if (specifier.id != null || specifier.effectiveId != null)
+            {
+                write(specifier.propertySpecifiers.size() + 1 + "");
+                writeDelimiter(writeNewline);
+                String idPropName = (specifier.effectiveId != null) ? "_id" : "id";
+                String id = (specifier.id != null) ? specifier.id : specifier.effectiveId;
+                write(ASEmitterTokens.SINGLE_QUOTE);
+                write(idPropName);
+                write(ASEmitterTokens.SINGLE_QUOTE);
+                writeDelimiter(writeNewline);
+                write(ASEmitterTokens.TRUE);
+                writeDelimiter(writeNewline);
+                write(ASEmitterTokens.SINGLE_QUOTE);
+                write(id);
+                write(ASEmitterTokens.SINGLE_QUOTE);
+                writeDelimiter(writeNewline);
+            }
+            else
+            {
+                write(specifier.propertySpecifiers.size() + "");
+                writeDelimiter(writeNewline);
+            }
+
+            outputDescriptorSpecifier(specifier, writeNewline);
+        }
+    }
+
+    //---------------------------------
+    //    outputEventSpecifier
+    //---------------------------------
+
+    public void outputEventSpecifier(MXMLEventSpecifier specifier, boolean writeNewline)
+    {
+        String handler = ASEmitterTokens.THIS.getToken()
+                + ASEmitterTokens.MEMBER_ACCESS.getToken() + specifier.eventHandler;
+        if (MXMLEventSpecifier.nameMap.contains(specifier.name))
+			specifier.name = specifier.name.toLowerCase();
+		else if (specifier.name.equals("doubleClick"))
+			specifier.name = "dblclick";
+		else if (specifier.name.equals("mouseWheel"))
+			specifier.name = "wheel";
+        writeSimpleDescriptor(specifier.name, null, handler, writeNewline);
+    }
+
+    //---------------------------------
+    //    outputChildren
+    //---------------------------------
+
+    private void outputChildren(MXMLDescriptorSpecifier children, boolean writeNewline)
+    {
+        write(ASEmitterTokens.SQUARE_OPEN.getToken());
+        if(writeNewline)
+        {
+            indentPush();
+            writeNewline();
+		}
+		outputDescriptorSpecifier(children, writeNewline);
+        if(writeNewline)
+        {
+            indentPop();
+            writeNewline();
+        }
+        write(ASEmitterTokens.SQUARE_CLOSE.getToken());
+	}
+	
+}
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleDocEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleDocEmitter.java
index e2f7805..8ee0bea 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleDocEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleDocEmitter.java
@@ -31,7 +31,9 @@
 import org.apache.royale.compiler.definitions.IClassDefinition;
 import org.apache.royale.compiler.definitions.IDefinition;
 import org.apache.royale.compiler.definitions.IFunctionDefinition;
+import org.apache.royale.compiler.definitions.IFunctionDefinition.FunctionClassification;
 import org.apache.royale.compiler.definitions.ITypeDefinition;
+import org.apache.royale.compiler.definitions.IVariableDefinition.VariableClassification;
 import org.apache.royale.compiler.definitions.references.IReference;
 import org.apache.royale.compiler.internal.codegen.as.ASEmitterTokens;
 import org.apache.royale.compiler.internal.codegen.js.JSEmitterTokens;
@@ -41,7 +43,6 @@
 import org.apache.royale.compiler.internal.codegen.js.jx.BindableEmitter;
 import org.apache.royale.compiler.internal.projects.RoyaleJSProject;
 import org.apache.royale.compiler.internal.scopes.ASScope;
-import org.apache.royale.compiler.parsing.IASToken;
 import org.apache.royale.compiler.problems.PublicVarWarningProblem;
 import org.apache.royale.compiler.projects.ICompilerProject;
 import org.apache.royale.compiler.tree.ASTNodeID;
@@ -58,6 +59,7 @@
     public boolean emitStringConversions = true;
     private boolean emitExports = true;
     private boolean exportProtected = false;
+    private boolean exportInternal = false;
     
     private boolean suppressClosure = false;
 
@@ -132,15 +134,11 @@
     {
     	RoyaleJSProject fjp = (RoyaleJSProject)project;
         boolean keepASDoc = fjp.config != null && fjp.config.getKeepASDoc();
-        boolean suppressExports = false;
-        if (emitter instanceof JSRoyaleEmitter) {
-            suppressExports = ((JSRoyaleEmitter) emitter).getModel().suppressExports;
-        }
-        if (fjp.config != null)
-        {
-        	emitExports = !suppressExports && fjp.config.getExportPublicSymbols();
-        	exportProtected = !suppressExports && fjp.config.getExportProtectedSymbols();
-        }
+
+        //exporting methods is handled dynamically in ClosureUtils
+        emitExports = false;
+        exportProtected = false;
+        exportInternal = false;
         
         coercionList = null;
         ignoreList = null;
@@ -279,6 +277,7 @@
                     else
                         begin();
                     emitMethodAccess(node);
+                    emitMethodNoCollapse(node, fjp);
                     hasDoc = true;
                 }
             }
@@ -296,6 +295,7 @@
 	                    else
 	                        begin();
 	                    emitMethodAccess(node);
+                        emitMethodNoCollapse(node, fjp);
 	                    hasDoc = true;
 	                }
 	
@@ -325,6 +325,7 @@
 	                        else
 	                            begin();
 	                        emitMethodAccess(node);
+                            emitMethodNoCollapse(node, fjp);
 	                        hasDoc = true;
 	                    }
 	
@@ -347,6 +348,7 @@
                         else
                             begin();
                         emitMethodAccess(node);
+                        emitMethodNoCollapse(node, fjp);
                         hasDoc = true;
                     }
 
@@ -535,18 +537,71 @@
         {
             emitProtected(node);
         }
-        else /*if (ns != null && ns == IASKeywordConstants.PUBLIC)*/
+        else if (ns == IASKeywordConstants.INTERNAL)
+        {
+            emitInternal(node);
+        }
+        else // public or custom namespace
         {
             emitPublic(node);
         }
     }
 
+    protected void emitMethodNoCollapse(IFunctionNode node, RoyaleJSProject fjp)
+    {
+        String ns = node.getNamespace();
+        if (ns == IASKeywordConstants.PROTECTED)
+        {
+            boolean preventRenameProtected = fjp.config != null && fjp.config.getPreventRenameProtectedSymbols();
+            if (preventRenameProtected)
+            {
+                emitNoCollapse(node);
+            }
+        }
+        else if (ns == IASKeywordConstants.INTERNAL)
+        {
+            boolean preventRenameInternal = fjp.config != null && fjp.config.getPreventRenameInternalSymbols();
+            if (preventRenameInternal)
+            {
+                emitNoCollapse(node);
+            }
+        }
+        else if(ns != IASKeywordConstants.PRIVATE) // public or custom namespace
+        {
+            boolean preventRenamePublic = fjp.config != null && fjp.config.getPreventRenamePublicSymbols();
+            if (preventRenamePublic)
+            {
+                emitNoCollapse(node);
+            }
+        }
+    }
+
+    protected void emitNoCollapse(IDefinitionNode node)
+    {
+        if (!node.hasModifier(ASModifier.STATIC)
+                || node instanceof IAccessorNode
+                || IASKeywordConstants.PRIVATE.equals(node.getNamespace()))
+        {
+            return;
+        }
+        //dynamically getting/setting a static field won't
+        //work properly if it is collapsed in a release build,
+        //even when it has been exported
+        emitJSDocLine(JSGoogDocEmitterTokens.NOCOLLAPSE);
+    }
+
     @Override
     public void emitFieldDoc(IVariableNode node, IDefinition def, ICompilerProject project)
     {
+        RoyaleJSProject fjp =  (RoyaleJSProject)project;
+
+        //exporting fields is handled dynamically in ClosureUtils
+        emitExports = false;
+        exportProtected = false;
+        exportInternal = false;
+
         begin();
 
-        RoyaleJSProject fjp =  (RoyaleJSProject)project;
         String ns = node.getNamespace();
         if (ns == IASKeywordConstants.PRIVATE)
         {
@@ -556,17 +611,26 @@
         {
             emitProtected(node);
             boolean preventRename = fjp.config != null && fjp.config.getPreventRenameProtectedSymbols();
-            if(preventRename && node.hasModifier(ASModifier.STATIC) && !(node instanceof IAccessorNode))
+            if (preventRename)
             {
-                //dynamically getting/setting a protected static variable
-                //won't work properly if it is collapsed, even when it
-                //has been exported
-                emitJSDocLine(JSGoogDocEmitterTokens.NOCOLLAPSE);
+                emitNoCollapse(node);
+            }
+        }
+        else if (ns == IASKeywordConstants.INTERNAL)
+        {
+            emitInternal(node);
+            boolean preventRename = fjp.config != null && fjp.config.getPreventRenameInternalSymbols();
+            if (preventRename)
+            {
+                emitNoCollapse(node);
             }
         }
         else
         {
-            boolean warnPublicVars = fjp.config != null && fjp.config.getWarnPublicVars() && !fjp.config.getPreventRenamePublicSymbols();
+            boolean warnPublicVars = fjp.config != null
+                    && fjp.config.getWarnPublicVars()
+                    && !fjp.config.getPreventRenamePublicSymbols()
+                    && !fjp.config.getMxmlReflectObjectProperty();
             IMetaTagsNode meta = node.getMetaTags();
             boolean bindable = false;
             if (meta != null)
@@ -591,12 +655,12 @@
                 }
                 
                 if (!suppressedWarning(node, fjp))
+                {
                 	fjp.getProblems().add(new PublicVarWarningProblem(node.getSourcePath(),
                             node.getStart(), node.getEnd(),
                             warningNode.getLine(), warningNode.getColumn(),
                             node.getEndLine(), node.getEndColumn()));
-               
-
+                }
             }
             boolean avoidExport = (node.getASDocComment() instanceof ASDocComment
                     && ((ASDocComment)node.getASDocComment()).commentNoEnd()
@@ -607,12 +671,9 @@
                 {
                     emitPublic(node);
                     boolean preventRename = fjp.config != null && fjp.config.getPreventRenamePublicSymbols();
-                    if(preventRename && node.hasModifier(ASModifier.STATIC) && !(node instanceof IAccessorNode))
+                    if(preventRename)
                     {
-                        //dynamically getting/setting a public static variable
-                        //won't work properly if it is collapsed, even when it
-                        //has been exported
-                        emitJSDocLine(JSGoogDocEmitterTokens.NOCOLLAPSE);
+                        emitNoCollapse(node);
                     }
                 }
             } else {
@@ -641,6 +702,15 @@
     	else
     		super.emitProtected(node);
     }
+
+    @Override
+    public void emitInternal(IASNode node)
+    {
+    	if (exportInternal)
+    		super.emitPublic(node);
+    	else
+    		super.emitInternal(node);
+    }
     
     @Override
     public void emitPublic(IASNode node)
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleEmitter.java
index 0626e79..471994c 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleEmitter.java
@@ -1551,6 +1551,18 @@
         	((RoyaleJSProject)project).needLanguage = true;
         getModel().needLanguage = true;
     }
+
+    @Override
+    public void emitAssignmentCoercion(IExpressionNode assignedNode, IDefinition definition)
+    {
+        super.emitAssignmentCoercion(assignedNode, definition);
+        if (getModel().inStaticInitializer)
+        {
+        	if (!staticUsedNames.contains(JSRoyaleEmitterTokens.LANGUAGE_QNAME.getToken()))
+        		staticUsedNames.add(JSRoyaleEmitterTokens.LANGUAGE_QNAME.getToken());
+        }
+
+    }
     
 	boolean isGoogProvided(String className)
 	{
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/utils/EmitterUtils.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/utils/EmitterUtils.java
index 0be6c74..c260963 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/utils/EmitterUtils.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/utils/EmitterUtils.java
@@ -52,6 +52,7 @@
 import org.apache.royale.compiler.projects.ICompilerProject;
 import org.apache.royale.compiler.tree.ASTNodeID;
 import org.apache.royale.compiler.tree.as.*;
+import org.apache.royale.compiler.utils.DefinitionUtils;
 import org.apache.royale.compiler.utils.NativeUtils;
 
 /**
@@ -940,4 +941,8 @@
         return false;
     }
 
+    public static final String getClassDepthNameBase(String base, IClassDefinition definition, ICompilerProject project) {
+        return base + "_" + DefinitionUtils.deltaFromObject(definition, project) +"_";
+    }
+
 }
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/MXMLSubEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/MXMLSubEmitter.java
new file mode 100644
index 0000000..25d7ae2
--- /dev/null
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/MXMLSubEmitter.java
@@ -0,0 +1,125 @@
+/*
+ *
+ *  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.internal.codegen.mxml;
+
+import org.apache.royale.compiler.codegen.IEmitterTokens;
+import org.apache.royale.compiler.codegen.mxml.js.IMXMLJSEmitter;
+import org.apache.royale.compiler.common.ISourceLocation;
+import org.apache.royale.compiler.projects.ICompilerProject;
+import org.apache.royale.compiler.visitor.IBlockWalker;
+
+public class MXMLSubEmitter {
+    private IMXMLJSEmitter emitter;
+
+    protected IMXMLJSEmitter getEmitter()
+    {
+        return emitter; 
+    }
+
+    protected IBlockWalker getMXMLWalker()
+    {
+        return emitter.getMXMLWalker();
+    }
+    
+    protected ICompilerProject getProject()
+    {
+        return emitter.getMXMLWalker().getProject();
+    }
+
+    public MXMLSubEmitter(IMXMLJSEmitter emitter)
+    {
+        this.emitter = emitter;
+    }
+
+    protected void write(IEmitterTokens value)
+    {
+        emitter.write(value);
+    }
+
+    protected void write(String value)
+    {
+        emitter.write(value);
+    }
+
+    protected void writeToken(IEmitterTokens value)
+    {
+        emitter.writeToken(value);
+    }
+
+    protected void writeToken(String value)
+    {
+        emitter.writeToken(value);
+    }
+
+    protected void writeNewline()
+    {
+        emitter.writeNewline();
+    }
+
+    protected void writeNewline(IEmitterTokens value)
+    {
+        emitter.writeNewline(value);
+    }
+
+    protected void writeNewline(String value)
+    {
+        emitter.writeNewline(value);
+    }
+
+    protected void writeNewline(IEmitterTokens value, boolean pushIndent)
+    {
+        emitter.writeNewline(value, pushIndent);
+    }
+
+    protected void writeNewline(String value, boolean pushIndent)
+    {
+        emitter.writeNewline(value, pushIndent);
+    }
+
+    protected void indentPush()
+    {
+        emitter.indentPush();
+    }
+
+    protected void indentPop()
+    {
+        emitter.indentPop();
+    }
+
+    protected void startMapping(ISourceLocation node)
+    {
+        emitter.startMapping(node);
+    }
+
+    protected void startMapping(ISourceLocation node, int line, int column)
+    {
+        emitter.startMapping(node, line, column);
+    }
+
+    protected void startMapping(ISourceLocation node, ISourceLocation afterNode)
+    {
+        emitter.startMapping(node, afterNode);
+    }
+
+    protected void endMapping(ISourceLocation node)
+    {
+        emitter.endMapping(node);
+    }
+}
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLDescriptorSpecifier.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLDescriptorSpecifier.java
index 2208f3a..617b4ed 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLDescriptorSpecifier.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLDescriptorSpecifier.java
@@ -21,10 +21,6 @@
 
 import java.util.ArrayList;
 
-import org.apache.royale.compiler.internal.codegen.as.ASEmitterTokens;
-import org.apache.royale.compiler.internal.codegen.js.goog.JSGoogEmitterTokens;
-import org.apache.royale.compiler.internal.codegen.js.royale.JSRoyaleEmitterTokens;
-
 /**
  * @author Erik de Bruin
  */
@@ -118,282 +114,4 @@
     //---------------------------------
 
     public MXMLDescriptorSpecifier parent;
-
-    //---------------------------------
-    //    currentIndent
-    //---------------------------------
- 
-    private int currentIndent = 0;
-
-    //--------------------------------------------------------------------------
-    //
-    //    Methods
-    //
-    //--------------------------------------------------------------------------
-
-    //---------------------------------
-    //    indent
-    //---------------------------------
-
-    protected String getIndent()
-    {
-        return getIndent(currentIndent);
-    }
-
-    protected String getIndent(int numIndent)
-    {
-        final StringBuilder sb = new StringBuilder();
-        if (parent != null)
-        {
-            sb.append(parent.getIndent());
-        }
-        for (int i = 0; i < numIndent; i++)
-            sb.append(JSRoyaleEmitterTokens.INDENT.getToken());
-        return sb.toString();
-    }
-
-    public void indentPush()
-    {
-        currentIndent++;
-    }
-
-    public void indentPop()
-    {
-        if (currentIndent > 0)
-        {
-            currentIndent--;
-        }
-    }
-
-    @Override
-    protected void writeNewline()
-    {
-        write(ASEmitterTokens.NEW_LINE);
-        write(getIndent(currentIndent));
-    }
-
-    //---------------------------------
-    //    outputEventSpecifier
-    //---------------------------------
-
-    private void outputEventSpecifier(boolean writeNewline)
-    {
-        // number of events
-        int count = 0;
-        for (MXMLEventSpecifier me : eventSpecifiers)
-        {
-            if (me.name != null)
-                count++;
-        }
-        write(count + "");
-
-        for (MXMLEventSpecifier me : eventSpecifiers)
-        {
-            writeDelimiter(writeNewline);
-            write(me.output(writeNewline));
-        }
-    }
-
-    //---------------------------------
-    //    outputPropertySpecifier
-    //---------------------------------
-
-    private String outputPropertySpecifier(boolean writeNewline)
-    {
-        write((isProperty) ? ASEmitterTokens.SINGLE_QUOTE.getToken() : "");
-        write(name);
-        write((isProperty) ? ASEmitterTokens.SINGLE_QUOTE.getToken() : "");
-        writeDelimiter(writeNewline);
-
-        if (isProperty)
-        {
-            if (value != null)
-            {
-                write(ASEmitterTokens.TRUE);
-                writeDelimiter(writeNewline);
-                // need to do other escaping here?
-                // restrict="0-9.\"
-                if (value.endsWith("\\'") && !value.endsWith("\\\\'"))
-                {
-                	value = value.substring(0, value.length() - 1) + "\\'";
-                }
-                write(value);
-            }
-            else
-            {
-                write((hasArray) ? ASEmitterTokens.NULL : ASEmitterTokens.FALSE);
-                writeDelimiter(writeNewline);
-                write(ASEmitterTokens.SQUARE_OPEN);
-                indentPush();
-                writeNewline();
-                output(writeNewline);
-                indentPop();
-                writeNewline();
-                write(ASEmitterTokens.SQUARE_CLOSE);
-            }
-
-            if (parent != null)
-                writeDelimiter(writeNewline);
-        }
-        else
-        {
-            for (MXMLDescriptorSpecifier md : propertySpecifiers)
-            {
-                if (md.name != null && md.name.equals("mxmlContent"))
-                {
-                    childrenSpecifier = md;
-                    propertySpecifiers.remove(md);
-                    break;
-                }
-            }
-
-            if (id != null || effectiveId != null)
-            {
-                write(propertySpecifiers.size() + 1 + "");
-                writeDelimiter(writeNewline);
-                String idPropName = (effectiveId != null) ? "_id"
-                        : "id";
-                writeSimpleDescriptor(idPropName, ASEmitterTokens.TRUE.getToken(),
-                        ASEmitterTokens.SINGLE_QUOTE.getToken()
-                                + ((id != null) ? id : effectiveId) + ASEmitterTokens.SINGLE_QUOTE.getToken(),
-                        writeNewline);
-
-                writeDelimiter(writeNewline);
-            }
-            else
-            {
-                write(propertySpecifiers.size() + "");
-                writeDelimiter(writeNewline);
-            }
-
-            output(writeNewline);
-        }
-
-        return sb.toString();
-    }
-
-    //---------------------------------
-    //    outputStyleSpecifier
-    //---------------------------------
-
-    private void outputStyleSpecifier(boolean writeNewline)
-    {
-        // TODO (erikdebruin) not yet implemented in Royale
-
-        write("0");
-        writeDelimiter(writeNewline);
-    }
-
-    //---------------------------------
-    //    output
-    //---------------------------------
-
-    @Override
-    public String output(boolean writeNewline)
-    {
-        if (isTopNode)
-        {
-            int count = 0;
-            for (MXMLDescriptorSpecifier md : propertySpecifiers)
-            {
-                if (md.name != null)
-                    count++;
-            }
-
-            write(count + "");
-            writeNewline(ASEmitterTokens.COMMA);
-        }
-
-        MXMLDescriptorSpecifier model = null; // model goes first
-        MXMLDescriptorSpecifier beads = null; // beads go last
-
-        for (MXMLDescriptorSpecifier md : propertySpecifiers)
-        {
-            if (md.name != null && md.name.equals("model"))
-            {
-                model = md;
-
-                break;
-            }
-        }
-
-        if (model != null)
-        {
-            write(model.outputPropertySpecifier(writeNewline));
-        }
-
-        for (MXMLDescriptorSpecifier md : propertySpecifiers)
-        {
-            if (md.name != null)
-            {
-                if (!md.name.equals("model") && !md.name.equals("beads"))
-                    write(md.outputPropertySpecifier(writeNewline));
-                else if (md.name.equals("beads"))
-                    beads = md;
-            }
-        }
-
-        if (beads != null)
-        {
-            write(beads.outputPropertySpecifier(writeNewline));
-        }
-
-        if (!isProperty)
-        {
-            outputStyleSpecifier(writeNewline);
-
-            // TODO (erikdebruin) not yet implemented in Royale
-            //outputEffectSpecifier(writeNewline);
-
-            outputEventSpecifier(writeNewline);
-
-            if (!isTopNode)
-            {
-                writeDelimiter(writeNewline);
-
-                if (childrenSpecifier == null)
-                    write(ASEmitterTokens.NULL);
-                else
-                    outputChildren(childrenSpecifier, writeNewline);
-            }
-
-            boolean isLastChild = parent != null
-                    && parent.propertySpecifiers.indexOf(this) == parent.propertySpecifiers
-                            .size() - 1;
-
-            if (!isLastChild && !isTopNode)
-                writeDelimiter(writeNewline);
-        }
-
-        return sb.toString();
-    }
-
-    private void outputChildren(MXMLDescriptorSpecifier children, boolean writeNewline)
-    {
-        write(ASEmitterTokens.SQUARE_OPEN.getToken());
-        if(writeNewline)
-        {
-            indentPush();
-            writeNewline();
-        }
-        write(children.output(writeNewline));
-        if(writeNewline)
-        {
-            indentPop();
-            writeNewline();
-        }
-        write(ASEmitterTokens.SQUARE_CLOSE.getToken());
-    }
-
-    public String outputStateDescriptors(boolean writeNewLine)
-    {
-        for (MXMLDescriptorSpecifier md : propertySpecifiers)
-        {
-            write(ASEmitterTokens.SQUARE_OPEN);
-            write(md.output(writeNewLine));
-            write(ASEmitterTokens.SQUARE_CLOSE);
-            writeNewline(ASEmitterTokens.COMMA);
-        }
-        return sb.toString();
-    }
 }
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLEventSpecifier.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLEventSpecifier.java
index 4c0f777..1e9de21 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLEventSpecifier.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLEventSpecifier.java
@@ -22,7 +22,6 @@
 import java.util.Arrays;
 import java.util.List;
 
-import org.apache.royale.compiler.internal.codegen.as.ASEmitterTokens;
 import org.apache.royale.compiler.tree.mxml.IMXMLEventSpecifierNode;
 
 /**
@@ -48,7 +47,7 @@
     //
     //--------------------------------------------------------------------------
 
-    static List<String> nameMap = Arrays.asList(
+    public static List<String> nameMap = Arrays.asList(
     		"rollOver",
     		"rollOut",
     		"mouseDown",
@@ -82,21 +81,6 @@
     //    output
     //---------------------------------
 
-    public String output(boolean writeNewline)
-    {
-        String handler = ASEmitterTokens.THIS.getToken()
-                + ASEmitterTokens.MEMBER_ACCESS.getToken() + eventHandler;
-        if (nameMap.contains(name))
-        	name = name.toLowerCase();
-		else if (name.equals("doubleClick"))
-			name = "dblclick";
-		else if (name.equals("mouseWheel"))
-			name = "wheel";
-        writeSimpleDescriptor(name, null, handler, writeNewline);
-
-        return sb.toString();
-    }
-
     public static String getJSEventName(String name)
     {
     	if (nameMap.contains(name))
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLNodeSpecifier.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLNodeSpecifier.java
index 62d4b6e..df66d69 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLNodeSpecifier.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLNodeSpecifier.java
@@ -19,9 +19,6 @@
 
 package org.apache.royale.compiler.internal.codegen.mxml.royale;
 
-import org.apache.royale.compiler.codegen.IEmitterTokens;
-import org.apache.royale.compiler.internal.codegen.as.ASEmitterTokens;
-
 /**
  * @author Erik de Bruin
  */
@@ -36,20 +33,7 @@
 
     public MXMLNodeSpecifier()
     {
-        sb = new StringBuilder();
     }
-
-    //--------------------------------------------------------------------------
-    //
-    //    Variables
-    //
-    //--------------------------------------------------------------------------
-
-    //---------------------------------
-    //    sb
-    //---------------------------------
-
-    protected StringBuilder sb;
     
     //--------------------------------------------------------------------------
     //
@@ -74,102 +58,4 @@
     //---------------------------------
 
     public boolean valueNeedsQuotes;
-
-    //--------------------------------------------------------------------------
-    //
-    //    Methods
-    //
-    //--------------------------------------------------------------------------
-
-    //---------------------------------
-    //    output
-    //---------------------------------
-
-    public String output(boolean writeNewline)
-    {
-        return "";
-    }
-
-    //---------------------------------
-    //    write
-    //---------------------------------
-
-    protected void write(IEmitterTokens value)
-    {
-        write(value.getToken());
-    }
-
-    protected void write(String value)
-    {
-        sb.append(value);
-    }
-
-    //---------------------------------
-    //    writeDelimiter
-    //---------------------------------
-
-    protected void writeDelimiter(boolean writeNewline)
-    {
-        if (writeNewline)
-            writeNewline(ASEmitterTokens.COMMA);
-        else
-            writeToken(ASEmitterTokens.COMMA);
-    }
-
-    //---------------------------------
-    //    writeNewline
-    //---------------------------------
-
-    protected void writeNewline(IEmitterTokens value)
-    {
-        writeNewline(value.getToken());
-    }
-
-    protected void writeNewline(String value)
-    {
-        write(value);
-        writeNewline();
-    }
-
-    protected void writeNewline()
-    {
-        write(ASEmitterTokens.NEW_LINE);
-    }
-
-    //---------------------------------
-    //    writeSimpleDescriptor
-    //---------------------------------
-
-    protected void writeSimpleDescriptor(String name, String type, String value,
-            boolean writeNewline)
-    {
-        write(ASEmitterTokens.SINGLE_QUOTE);
-        write(name);
-        write(ASEmitterTokens.SINGLE_QUOTE);
-        writeDelimiter(writeNewline);
-
-        if (type != null)
-        {
-            write(type);
-            writeDelimiter(writeNewline);
-        }
-
-        write(value);
-    }
-
-    //---------------------------------
-    //    writeToken
-    //---------------------------------
-
-    protected void writeToken(IEmitterTokens value)
-    {
-        writeToken(value.getToken());
-    }
-
-    protected void writeToken(String value)
-    {
-        write(value);
-        write(ASEmitterTokens.SPACE);
-    }
-
 }
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyaleASDocEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyaleASDocEmitter.java
index 3aae3b8..14d6008 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyaleASDocEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyaleASDocEmitter.java
@@ -38,6 +38,7 @@
 import org.apache.royale.compiler.internal.codegen.databinding.BindingDatabase;
 import org.apache.royale.compiler.internal.codegen.databinding.BindingInfo;
 import org.apache.royale.compiler.internal.codegen.js.royale.JSRoyaleASDocEmitter;
+import org.apache.royale.compiler.internal.codegen.js.royale.JSRoyaleEmitter;
 import org.apache.royale.compiler.internal.codegen.js.royale.JSRoyaleEmitterTokens;
 import org.apache.royale.compiler.internal.codegen.js.utils.EmitterUtils;
 import org.apache.royale.compiler.internal.codegen.mxml.MXMLEmitter;
@@ -355,16 +356,22 @@
         MXMLDescriptorSpecifier currentDescriptor = getCurrentDescriptor("i");
 
         MXMLEventSpecifier eventSpecifier = new MXMLEventSpecifier();
-        eventSpecifier.eventHandler = MXMLRoyaleEmitterTokens.EVENT_PREFIX
-                .getToken() + eventCounter++;
+        IASEmitter asEmitter = ((IMXMLBlockWalker) getMXMLWalker()).getASEmitter();
+        JSRoyaleEmitter fjs = (JSRoyaleEmitter)asEmitter;
+
+        IClassDefinition currentClass = fjs.getModel().getCurrentClass();
+        //naming needs to avoid conflicts with ancestors - using delta from object which is
+        //a) short and b)provides a 'unique' (not zero risk, but very low risk) option
+        String nameBase = EmitterUtils.getClassDepthNameBase(MXMLRoyaleEmitterTokens.EVENT_PREFIX
+                .getToken(), currentClass, getMXMLWalker().getProject());
+        eventSpecifier.eventHandler = nameBase + eventCounter++;
+
         eventSpecifier.name = cdef.getBaseName();
         eventSpecifier.type = node.getEventParameterDefinition()
                 .getTypeAsDisplayString();
 
         eventHandlerNameMap.put(node, eventSpecifier.eventHandler);
-        
-        IASEmitter asEmitter = ((IMXMLBlockWalker) getMXMLWalker())
-                .getASEmitter();
+
 
         StringBuilder sb = null;
         int len = node.getChildCount();
@@ -406,8 +413,14 @@
         String id = node.getID();
         if (id == null)
             id = node.getEffectiveID();
-        if (id == null)
-            id = MXMLRoyaleEmitterTokens.ID_PREFIX.getToken() + idCounter++;
+        if (id == null) {
+            IASEmitter asEmitter = ((IMXMLBlockWalker) getMXMLWalker()).getASEmitter();
+            JSRoyaleEmitter fjs = (JSRoyaleEmitter)asEmitter;
+            IClassDefinition currentClass = fjs.getModel().getCurrentClass();
+            //naming needs to avoid conflicts with ancestors - using delta from object which is
+            //a) short and b)provides a 'unique' (not zero risk, but very low risk) option
+            id = EmitterUtils.getClassDepthNameBase(MXMLRoyaleEmitterTokens.ID_PREFIX.getToken(), currentClass, getMXMLWalker().getProject()) + idCounter++;
+        }
 
         MXMLDescriptorSpecifier currentInstance = new MXMLDescriptorSpecifier();
         currentInstance.isProperty = false;
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 86083af..7744ebc 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
@@ -38,13 +38,13 @@
 import org.apache.royale.abc.ABCConstants;
 import org.apache.royale.abc.instructionlist.InstructionList;
 import org.apache.royale.abc.semantics.Instruction;
-import org.apache.royale.abc.semantics.MethodInfo;
 import org.apache.royale.abc.semantics.Name;
 import org.apache.royale.abc.semantics.Namespace;
 import org.apache.royale.abc.semantics.OneOperandInstruction;
+import org.apache.royale.compiler.codegen.ISubEmitter;
 import org.apache.royale.compiler.codegen.as.IASEmitter;
 import org.apache.royale.compiler.codegen.js.IJSEmitter;
-import org.apache.royale.compiler.codegen.js.IMappingEmitter;
+import org.apache.royale.compiler.codegen.mxml.js.IMXMLJSEmitter;
 import org.apache.royale.compiler.codegen.mxml.royale.IMXMLRoyaleEmitter;
 import org.apache.royale.compiler.common.ASModifier;
 import org.apache.royale.compiler.common.DependencyType;
@@ -71,6 +71,7 @@
 import org.apache.royale.compiler.internal.codegen.js.JSSessionModel.BindableVarInfo;
 import org.apache.royale.compiler.internal.codegen.js.royale.JSRoyaleEmitter;
 import org.apache.royale.compiler.internal.codegen.js.royale.JSRoyaleEmitterTokens;
+import org.apache.royale.compiler.internal.codegen.js.royale.JSRoyaleBasicMXMLDescriptorEmitter;
 import org.apache.royale.compiler.internal.codegen.js.goog.JSGoogDocEmitter;
 import org.apache.royale.compiler.internal.codegen.js.goog.JSGoogEmitterTokens;
 import org.apache.royale.compiler.internal.codegen.js.jx.BindableEmitter;
@@ -113,7 +114,7 @@
  * @author Erik de Bruin
  */
 public class MXMLRoyaleEmitter extends MXMLEmitter implements
-        IMXMLRoyaleEmitter, IMappingEmitter
+        IMXMLRoyaleEmitter, IMXMLJSEmitter
 {
 
 	// the instances in a container
@@ -152,6 +153,8 @@
     private String interfaceList;
     private boolean emitExports = true;
 
+    private ISubEmitter<MXMLDescriptorSpecifier> mxmlDescriptorEmitter;
+
     /**
      * This keeps track of the entries in our temporary array of
      * DeferredInstanceFromFunction objects that we CG to help with
@@ -177,6 +180,8 @@
     {
         super(out);
         sourceMapMappings = new ArrayList<SourceMapMapping>();
+
+        mxmlDescriptorEmitter = new JSRoyaleBasicMXMLDescriptorEmitter(this);
     }
 
     @Override
@@ -838,6 +843,7 @@
 
         descriptorTree = new ArrayList<MXMLDescriptorSpecifier>();
         propertiesTree = new MXMLDescriptorSpecifier();
+        propertiesTree.name = node.getQualifiedName();
 
         events = new ArrayList<MXMLEventSpecifier>();
         instances = new ArrayList<MXMLDescriptorSpecifier>();
@@ -1110,8 +1116,15 @@
 	        writeNewline(" * @type {Array}");
 	        writeNewline(" */");
 	        writeNewline("this.mxmlsd = " + ASEmitterTokens.SQUARE_OPEN.getToken());
-	        indentPush();
-	        write(root.outputStateDescriptors(false));
+            indentPush();
+            
+            for (MXMLDescriptorSpecifier md : root.propertySpecifiers)
+            {
+                write(ASEmitterTokens.SQUARE_OPEN);
+                mxmlDescriptorEmitter.emit(md);
+                write(ASEmitterTokens.SQUARE_CLOSE);
+                writeNewline(ASEmitterTokens.COMMA);
+            }
 	        write("null");
 	        write(ASEmitterTokens.SQUARE_CLOSE);
 	        indentPop();
@@ -1139,11 +1152,7 @@
 
             MXMLDescriptorSpecifier root = propertiesTree;
             root.isTopNode = true;
-            for(int i = 0; i < getCurrentIndent(); i++)
-            {
-                root.indentPush();
-            }
-            write(root.output(true));
+            mxmlDescriptorEmitter.emit(root);
             indentPop();
             writeNewline();
 
@@ -1166,21 +1175,6 @@
         write(ASEmitterTokens.PAREN_CLOSE);
         writeNewline(ASEmitterTokens.SEMICOLON);
 
-	    writeNewline();
-	    writeNewline();
-        writeNewline("/**");
-	    writeNewline(" * Prevent renaming of class. Needed for reflection.");
-        writeNewline(" */");
-	    write(JSRoyaleEmitterTokens.GOOG_EXPORT_SYMBOL);
-	    write(ASEmitterTokens.PAREN_OPEN);
-	    write(ASEmitterTokens.SINGLE_QUOTE);
-	    write(formatQualifiedName(cname));
-	    write(ASEmitterTokens.SINGLE_QUOTE);
-	    write(ASEmitterTokens.COMMA);
-	    write(ASEmitterTokens.SPACE);
-	    write(formatQualifiedName(cname));
-	    write(ASEmitterTokens.PAREN_CLOSE);
-	    write(ASEmitterTokens.SEMICOLON);
         writeNewline();
         writeNewline();
 	    writeNewline();
@@ -1477,15 +1471,20 @@
     {
         for (MXMLDescriptorSpecifier instance : instances)
         {
-            writeNewline();
-            writeNewline("/**");
-            writeNewline(" * @private");
-            writeNewline(" * @type {" + instance.name + "}");
-            writeNewline(" */");
-            write(ASEmitterTokens.THIS);
-            write(ASEmitterTokens.MEMBER_ACCESS);
-            write((instance.id != null ? instance.id : instance.effectiveId) + "_");
-            writeNewline(ASEmitterTokens.SEMICOLON);
+			String id = instance.id != null ? instance.id : instance.effectiveId;
+			if (id != null) { //it seems id can be null, for example with a generated Object for Operations via RemoteObject
+				writeNewline();
+				writeNewline("/**");
+				writeNewline(" * @private");
+				writeNewline(" * @type {" + instance.name + "}");
+				writeNewline(" */");
+				write(ASEmitterTokens.THIS);
+				write(ASEmitterTokens.MEMBER_ACCESS);
+
+				if (!id.startsWith(MXMLRoyaleEmitterTokens.ID_PREFIX.getToken())) id += "_";
+				write(id);
+				writeNewline(ASEmitterTokens.SEMICOLON);
+			}
         }
     }
 
@@ -1507,8 +1506,11 @@
 
     private void outputBindingInfoAsData(String cname, BindingDatabase bindingDataBase)
     {
+        RoyaleJSProject project = (RoyaleJSProject)getMXMLWalker().getProject();
         IASEmitter asEmitter = ((IMXMLBlockWalker) getMXMLWalker())
                 .getASEmitter();
+        boolean allowDynamicBindings = project.config != null && project.config.getAllowDynamicBindings();
+        boolean useMxmlReflectObjectProperty = project.config != null && project.config.getMxmlReflectObjectProperty();
         
         writeNewline("/**");
         writeNewline(" * @export"); // must export or else GCC will remove it
@@ -1516,19 +1518,27 @@
         writeNewline(formatQualifiedName(cname)
                 + ".prototype._bindings = [");
 
+		if (bindingDataBase.getHasAncestorBindings()) {
+			//reference the ancestor binding data (which may in turn reference its owner's ancestor's bindings etc)
+			writeNewline(formatQualifiedName(bindingDataBase.getNearestAncestorWithBindings()) +
+					 ".prototype._bindings,");
+		}
+
         Set<BindingInfo> bindingInfo = bindingDataBase.getBindingInfo();
         writeNewline(bindingInfo.size() + ","); // number of bindings
         boolean hadOutput = false;
         for (BindingInfo bi : bindingInfo)
         {
-            if (hadOutput) writeNewline(ASEmitterTokens.COMMA.getToken());
+            if (hadOutput)
+            {
+                writeNewline(ASEmitterTokens.COMMA);
+            }
             hadOutput = true;
             String s;
             IMXMLNode node = bi.node;
             if (node instanceof IMXMLSingleDataBindingNode)
             {
             	IMXMLSingleDataBindingNode sbdn = (IMXMLSingleDataBindingNode)node;
-            	RoyaleJSProject project = (RoyaleJSProject)getMXMLWalker().getProject();
             	IDefinition bdef = sbdn.getExpressionNode().resolve(project);
             	if (bdef != null)
             	{
@@ -1539,10 +1549,13 @@
             s = bi.getSourceString();
             if (s == null && bi.isSourceSimplePublicProperty())
                 s = getSourceStringFromGetter(bi.getExpressionNodesForGetter());
-            if (s == null || s.length() == 0)
+            if (!allowDynamicBindings || s == null || s.length() == 0)
             {
                 List<IExpressionNode> getterNodes = bi.getExpressionNodesForGetter();
                 StringBuilder sb = new StringBuilder();
+                sb.append("/** @this {");
+                sb.append(formatQualifiedName(cname));
+                sb.append("} */\n");
                 sb.append("function() { return ");
                 int n = getterNodes.size();
                 for (int i = 0; i < n; i++)
@@ -1550,7 +1563,11 @@
                 	IExpressionNode getterNode = getterNodes.get(i);
                     sb.append(asEmitter.stringifyNode(getterNode));
                     if (i < n - 1)
-                    	sb.append(ASEmitterTokens.SPACE.getToken() + ASEmitterTokens.PLUS.getToken() + ASEmitterTokens.SPACE.getToken());
+                    {
+                        sb.append(ASEmitterTokens.SPACE.getToken());
+                        sb.append(ASEmitterTokens.PLUS.getToken());
+                        sb.append(ASEmitterTokens.SPACE.getToken());
+                    }
                 }
                 sb.append("; },");
                 writeNewline(sb.toString());
@@ -1559,71 +1576,197 @@
             {
             	if (bi.classDef != null)
             	{
-	                String[] parts = s.split("\\.");
-	                write(ASEmitterTokens.SQUARE_OPEN.getToken() + ASEmitterTokens.DOUBLE_QUOTE.getToken() +
-	                        bi.classDef.getQualifiedName() + ASEmitterTokens.DOUBLE_QUOTE.getToken());
+                    String[] parts = s.split("\\.");
 	                String qname = bi.classDef.getQualifiedName();
+                    write(ASEmitterTokens.SQUARE_OPEN);
+                    write(ASEmitterTokens.DOUBLE_QUOTE);
+                    write(qname);
+                    write(ASEmitterTokens.DOUBLE_QUOTE);
 	                if (!usedNames.contains(qname))
 	                	usedNames.add(qname);
 	                if (!staticUsedNames.contains(qname))
 	                	staticUsedNames.add(qname);
+                    StringBuilder objString = null;
+                    if (useMxmlReflectObjectProperty)
+                    {
+                        objString = new StringBuilder();
+                        objString.append(qname);
+                    }
 	                int n = parts.length;
 	                for (int i = 1; i < n; i++)
 	                {
 	                    String part = parts[i];
-	                    write(", " +  ASEmitterTokens.DOUBLE_QUOTE.getToken() + part + ASEmitterTokens.DOUBLE_QUOTE.getToken());
+                        write(", ");
+                        if(useMxmlReflectObjectProperty)
+                        {
+                            write(JSGoogEmitterTokens.GOOG_REFLECT_OBJECTPROPERTY);
+                            write(ASEmitterTokens.PAREN_OPEN);
+                        }
+                        write(ASEmitterTokens.DOUBLE_QUOTE);
+                        write(part);
+                        write(ASEmitterTokens.DOUBLE_QUOTE);
+                        if(useMxmlReflectObjectProperty)
+                        {
+                            write(ASEmitterTokens.COMMA);
+                            write(ASEmitterTokens.SPACE);
+                            write(objString.toString());
+                            write(ASEmitterTokens.PAREN_CLOSE);
+                            objString.append(".");
+                            objString.append(part);
+                        }
 	                }
-	                writeNewline(ASEmitterTokens.SQUARE_CLOSE.getToken() + ASEmitterTokens.COMMA.getToken());
+                    write(ASEmitterTokens.SQUARE_CLOSE);
+                    writeNewline(ASEmitterTokens.COMMA);
             	}
             	else
             	{
 	                String[] parts = s.split("\\.");
-	                write(ASEmitterTokens.SQUARE_OPEN.getToken() + ASEmitterTokens.DOUBLE_QUOTE.getToken() +
-	                        parts[0] + ASEmitterTokens.DOUBLE_QUOTE.getToken());
-	                int n = parts.length;
-	                for (int i = 1; i < n; i++)
+                    write(ASEmitterTokens.SQUARE_OPEN);
+                    StringBuilder objString = null;
+                    if (useMxmlReflectObjectProperty)
+                    {
+                        objString = new StringBuilder();
+                        objString.append("this");
+                    }
+                    int n = parts.length;
+	                for (int i = 0; i < n; i++)
 	                {
-	                    String part = parts[i];
-	                    write(", " +  ASEmitterTokens.DOUBLE_QUOTE.getToken() + part + ASEmitterTokens.DOUBLE_QUOTE.getToken());
-	                }
-	                writeNewline(ASEmitterTokens.SQUARE_CLOSE.getToken() + ASEmitterTokens.COMMA.getToken());
+                        String part = parts[i];
+                        if (i > 0)
+                        {
+                            write(", ");
+                        }
+                        if(useMxmlReflectObjectProperty)
+                        {
+                            write(JSGoogEmitterTokens.GOOG_REFLECT_OBJECTPROPERTY);
+                            write(ASEmitterTokens.PAREN_OPEN);
+                        }
+                        write(ASEmitterTokens.DOUBLE_QUOTE);
+                        write(part);
+                        write(ASEmitterTokens.DOUBLE_QUOTE);
+                        if(useMxmlReflectObjectProperty)
+                        {
+                            write(ASEmitterTokens.COMMA);
+                            write(ASEmitterTokens.SPACE);
+                            write(objString.toString());
+                            write(ASEmitterTokens.PAREN_CLOSE);
+                            objString.append(".");
+                            objString.append(part);
+                        }
+                    }
+                    write(ASEmitterTokens.SQUARE_CLOSE);
+	                writeNewline(ASEmitterTokens.COMMA);
             	}
             }
             else
-                writeNewline(ASEmitterTokens.DOUBLE_QUOTE.getToken() + s +
-                        ASEmitterTokens.DOUBLE_QUOTE.getToken() + ASEmitterTokens.COMMA.getToken());
+            {
+                if(useMxmlReflectObjectProperty)
+                {
+                    write(JSGoogEmitterTokens.GOOG_REFLECT_OBJECTPROPERTY);
+                    write(ASEmitterTokens.PAREN_OPEN);
+                }
+                write(ASEmitterTokens.DOUBLE_QUOTE);
+                write(s);
+                write(ASEmitterTokens.DOUBLE_QUOTE);
+                if(useMxmlReflectObjectProperty)
+                {
+                    write(ASEmitterTokens.COMMA);
+                    write(ASEmitterTokens.SPACE);
+                    write(ASEmitterTokens.THIS);
+                    write(ASEmitterTokens.PAREN_CLOSE);
+                }
+                writeNewline(ASEmitterTokens.COMMA);
+            }
 
             IExpressionNode destNode = bi.getExpressionNodeForDestination();
             s = bi.getDestinationString();
-            if (destNode != null && s == null)
+            if (!allowDynamicBindings && destNode == null && s != null)
+            {
+                StringBuilder sb = new StringBuilder();
+                sb.append("/** @this {");
+                sb.append(formatQualifiedName(cname));
+                sb.append("} */\n");
+                sb.append("function(value) { ");
+                sb.append("this.");
+                sb.append(s);
+                sb.append(" = value; },");
+                writeNewline(sb.toString());
+                s = null;
+            }
+            else if (destNode != null && s == null)
             {
                 StringBuilder sb = new StringBuilder();
                 sb.append(generateSetterFunction(bi, destNode));
-                writeNewline(sb.toString() + ASEmitterTokens.COMMA.getToken());
+                write(sb.toString());
+                writeNewline(ASEmitterTokens.COMMA);
             }
             else
-                writeNewline(ASEmitterTokens.NULL.getToken() + ASEmitterTokens.COMMA.getToken());
+            {
+                write(ASEmitterTokens.NULL);
+                writeNewline(ASEmitterTokens.COMMA);
+            }
 
             if (s == null)
             {
-                write(ASEmitterTokens.NULL.getToken());
+                write(ASEmitterTokens.NULL);
             }
             else if (s.contains("."))
             {
                 String[] parts = s.split("\\.");
-                write(ASEmitterTokens.SQUARE_OPEN.getToken() + ASEmitterTokens.DOUBLE_QUOTE.getToken() +
-                        parts[0] + ASEmitterTokens.DOUBLE_QUOTE.getToken());
+                write(ASEmitterTokens.SQUARE_OPEN);
+                StringBuilder objString = null;
+                if (useMxmlReflectObjectProperty)
+                {
+                    objString = new StringBuilder();
+                    objString.append("this");
+                }
                 int n = parts.length;
-                for (int i = 1; i < n; i++)
+                for (int i = 0; i < n; i++)
                 {
                     String part = parts[i];
-                    write(", " + ASEmitterTokens.DOUBLE_QUOTE.getToken() + part + ASEmitterTokens.DOUBLE_QUOTE.getToken());
+                    if (i > 0)
+                    {
+                        write(", ");
+                    }
+                    if(useMxmlReflectObjectProperty)
+                    {
+                        write(JSGoogEmitterTokens.GOOG_REFLECT_OBJECTPROPERTY);
+                        write(ASEmitterTokens.PAREN_OPEN);
+                    }
+                    write(ASEmitterTokens.DOUBLE_QUOTE);
+                    write(part);
+                    write(ASEmitterTokens.DOUBLE_QUOTE);
+                    if(useMxmlReflectObjectProperty)
+                    {
+                        write(ASEmitterTokens.COMMA);
+                        write(ASEmitterTokens.SPACE);
+                        write(objString.toString());
+                        write(ASEmitterTokens.PAREN_CLOSE);
+                        objString.append(".");
+                        objString.append(part);
+                    }
                 }
-                write(ASEmitterTokens.SQUARE_CLOSE.getToken());
+                write(ASEmitterTokens.SQUARE_CLOSE);
             }
             else
-                write(ASEmitterTokens.DOUBLE_QUOTE.getToken() + s +
-                        ASEmitterTokens.DOUBLE_QUOTE.getToken());
+            {
+                if(useMxmlReflectObjectProperty)
+                {
+                    write(JSGoogEmitterTokens.GOOG_REFLECT_OBJECTPROPERTY);
+                    write(ASEmitterTokens.PAREN_OPEN);
+                }
+                write(ASEmitterTokens.DOUBLE_QUOTE);
+                write(s);
+                write(ASEmitterTokens.DOUBLE_QUOTE);
+                if(useMxmlReflectObjectProperty)
+                {
+                    write(ASEmitterTokens.COMMA);
+                    write(ASEmitterTokens.SPACE);
+                    write(ASEmitterTokens.THIS);
+                    write(ASEmitterTokens.PAREN_CLOSE);
+                }
+                writeNewline(ASEmitterTokens.COMMA);
+            }
             
         }
         Set<Entry<Object, WatcherInfoBase>> watcherChains = bindingDataBase.getWatcherChains();
@@ -1646,7 +1789,8 @@
             if (hadOutput) writeNewline();
         }
 
-        writeNewline( ASEmitterTokens.SQUARE_CLOSE.getToken() + ASEmitterTokens.SEMICOLON.getToken());
+        write(ASEmitterTokens.SQUARE_CLOSE);
+        writeNewline(ASEmitterTokens.SEMICOLON);
     }
 
     private String generateSetterFunction(BindingInfo bi, IExpressionNode destNode) {
@@ -2110,10 +2254,22 @@
 
     	String formattedCName = formatQualifiedName(cname);
 
-    	write("Object.defineProperties(");
+        write(JSGoogEmitterTokens.OBJECT);
+        write(ASEmitterTokens.MEMBER_ACCESS);
+        write(JSEmitterTokens.DEFINE_PROPERTIES);
+        write(ASEmitterTokens.PAREN_OPEN);
     	write(formattedCName);
-    	writeNewline(".prototype, /** @lends {" + formattedCName + ".prototype} */ {");
+        write(ASEmitterTokens.MEMBER_ACCESS);
+        write(JSEmitterTokens.PROTOTYPE);
+        write(ASEmitterTokens.COMMA);
+        write(ASEmitterTokens.SPACE);
+        write("/** @lends {");
+        write(formattedCName);
+        write(ASEmitterTokens.MEMBER_ACCESS);
+        write(JSEmitterTokens.PROTOTYPE);
+    	write("} */ {");
         indentPush();
+        writeNewline();
         int i = 0;
         for (MXMLDescriptorSpecifier instance : instances)
         {
@@ -2124,7 +2280,6 @@
             if (instanceId != null)
             {
                 indentPush();
-    	        writeNewline("/** @export */");
                 writeNewline(instanceId + ": {");
                 writeNewline("/** @this {" + formattedCName + "} */");
                 indentPush();
@@ -2187,13 +2342,9 @@
             writeNewline("var arr = " + formatQualifiedName(cname) + ".superClass_.get__MXMLDescriptor.apply(this);");
             writeNewline("/** @type {Array} */");
             indentPush();
-            writeNewline("var data = [");
+            writeNewline("var mxmldd = [");
 
-            for(int i = 0; i < getCurrentIndent(); i++)
-            {
-                root.indentPush();
-            }
-            write(root.output(true));
+            mxmlDescriptorEmitter.emit(root);
             indentPop();
             writeNewline();
 
@@ -2201,12 +2352,12 @@
             indentPush();
             writeNewline("if (arr)");
             indentPop();
-            writeNewline("this.mxmldd = arr.concat(data);");
+            writeNewline("this.mxmldd = arr.concat(mxmldd);");
             indentPush();
             writeNewline("else");
             indentPop();
             indentPop();
-            writeNewline("this.mxmldd = data;");
+            writeNewline("this.mxmldd = mxmldd;");
             writeNewline("}");
             indentPop();
             writeNewline("return this.mxmldd;");
@@ -2267,8 +2418,16 @@
         MXMLDescriptorSpecifier currentDescriptor = getCurrentDescriptor("i");
 
         MXMLEventSpecifier eventSpecifier = new MXMLEventSpecifier();
-        eventSpecifier.eventHandler = MXMLRoyaleEmitterTokens.EVENT_PREFIX
-                .getToken() + eventCounter++;
+
+		IASEmitter asEmitter = ((IMXMLBlockWalker) getMXMLWalker()).getASEmitter();
+		JSRoyaleEmitter fjs = (JSRoyaleEmitter)asEmitter;
+
+		IClassDefinition currentClass = fjs.getModel().getCurrentClass();
+		//naming needs to avoid conflicts with ancestors - using delta from object which is
+		//a) short and b)provides a 'unique' (not zero risk, but very low risk) option
+        String nameBase = EmitterUtils.getClassDepthNameBase(MXMLRoyaleEmitterTokens.EVENT_PREFIX
+				.getToken(), currentClass, getMXMLWalker().getProject());
+        eventSpecifier.eventHandler = nameBase + eventCounter++;
         eventSpecifier.name = cdef.getBaseName();
         eventSpecifier.type = node.getEventParameterDefinition()
                 .getTypeAsDisplayString();
@@ -3025,6 +3184,50 @@
     }
 
     @Override
+    public void emitBoolean(IMXMLBooleanNode node)
+    {
+    	if (node.getParent().getNodeID() == ASTNodeID.MXMLDeclarationsID)
+    	{
+    		primitiveDeclarationNodes.add(node);
+    		return;
+    	}
+    	super.emitBoolean(node);
+    }
+    
+    @Override
+    public void emitNumber(IMXMLNumberNode node)
+    {
+    	if (node.getParent().getNodeID() == ASTNodeID.MXMLDeclarationsID)
+    	{
+    		primitiveDeclarationNodes.add(node);
+    		return;
+    	}
+    	super.emitNumber(node);
+    }
+    
+    @Override
+    public void emitInt(IMXMLIntNode node)
+    {
+    	if (node.getParent().getNodeID() == ASTNodeID.MXMLDeclarationsID)
+    	{
+    		primitiveDeclarationNodes.add(node);
+    		return;
+    	}
+    	super.emitInt(node);
+    }
+    
+    @Override
+    public void emitUint(IMXMLUintNode node)
+    {
+    	if (node.getParent().getNodeID() == ASTNodeID.MXMLDeclarationsID)
+    	{
+    		primitiveDeclarationNodes.add(node);
+    		return;
+    	}
+    	super.emitUint(node);
+    }
+    
+    @Override
     public void emitString(IMXMLStringNode node)
     {
     	if (node.getParent().getNodeID() == ASTNodeID.MXMLDeclarationsID)
@@ -3395,7 +3598,8 @@
     @SuppressWarnings("incomplete-switch")
 	private void emitComplexInitializers(IASNode node)
     {
-    	int n = node.getChildCount();
+        boolean wroteSelf = false;
+        int n = node.getChildCount();
     	for (int i = 0; i < n; i++)
     	{
     		IASNode child = node.getChild(i);
@@ -3412,12 +3616,23 @@
     					IVariableNode varnode = (IVariableNode)schild;
     			        IExpressionNode vnode = varnode.getAssignedValueNode();
 
-
                         if (vnode != null && (!EmitterUtils.isScalar(vnode)))
     			        {
     	                    IDefinition varDef = varnode.getDefinition();
     	                    if (varDef.isStatic())
+                            {
     	                    	continue;
+                            }
+                            if(!wroteSelf && vnode instanceof IFunctionObjectNode)
+                            {
+                                writeNewline();
+                                writeToken(ASEmitterTokens.VAR);
+                                writeToken(JSGoogEmitterTokens.SELF);
+                                writeToken(ASEmitterTokens.EQUAL);
+                                write(ASEmitterTokens.THIS);
+                                writeNewline(ASEmitterTokens.SEMICOLON);
+                                wroteSelf = true;
+                            }
     	                    writeNewline();
     	                    write(ASEmitterTokens.THIS);
     	                    write(ASEmitterTokens.MEMBER_ACCESS);
@@ -3460,43 +3675,57 @@
 	    		case MXMLStringID:
 	    		{
 	    			IMXMLStringNode stringNode = (IMXMLStringNode)declNode;
-	    			varname = stringNode.getEffectiveID();
-	                writeNewline();
-	                write(ASEmitterTokens.THIS);
-	                write(ASEmitterTokens.MEMBER_ACCESS);
-	                write(varname);
-	                write(ASEmitterTokens.SPACE);
-	                writeToken(ASEmitterTokens.EQUAL);
-	                IMXMLLiteralNode valueNode = (IMXMLLiteralNode)(stringNode.getExpressionNode());
-	                Object value = valueNode.getValue();
-	                write(objectToString(value));
-	                write(ASEmitterTokens.SEMICOLON);
+                    IASNode expressionNode = stringNode.getExpressionNode();
+                    // it might be a binding expression instead of a literal
+                    if (expressionNode instanceof IMXMLLiteralNode)
+                    {
+                        varname = stringNode.getEffectiveID();
+                        writeNewline();
+                        write(ASEmitterTokens.THIS);
+                        write(ASEmitterTokens.MEMBER_ACCESS);
+                        write(varname);
+                        write(ASEmitterTokens.SPACE);
+                        writeToken(ASEmitterTokens.EQUAL);
+                        IMXMLLiteralNode valueNode = (IMXMLLiteralNode) expressionNode;
+                        Object value = valueNode.getValue();
+                        write(objectToString(value));
+                        write(ASEmitterTokens.SEMICOLON);
+                    }
 	                break;
 	    		}
 				case MXMLArrayID:
 				{
 					IMXMLArrayNode arrayNode = (IMXMLArrayNode)declNode;
-					varname = arrayNode.getEffectiveID();
-		            writeNewline();
-		            write(ASEmitterTokens.THIS);
-		            write(ASEmitterTokens.MEMBER_ACCESS);
-		            write(varname);
-		            write(ASEmitterTokens.SPACE);
-		            writeToken(ASEmitterTokens.EQUAL);
-		            write("[");
-		            int m = arrayNode.getChildCount();
-	            	boolean firstOne = true;
-		            for (int j = 0; j < m; j++)
-		            {
-			            IMXMLInstanceNode valueNode = (IMXMLInstanceNode)(arrayNode.getChild(j));
-		            	if (firstOne)
-		            		firstOne = false;
-		            	else
-		            		writeToken(",");
-			            write(instanceToString(valueNode));
-		            }
-		            write("]");
-		            write(ASEmitterTokens.SEMICOLON);
+                    int m = arrayNode.getChildCount();
+                    boolean isDataBinding = false;
+                    if(m == 1)
+                    {
+                        IASNode child = arrayNode.getChild(0);
+                        isDataBinding = child instanceof IMXMLDataBindingNode;
+                    }
+                    if (!isDataBinding)
+                    {
+                        varname = arrayNode.getEffectiveID();
+                        writeNewline();
+                        write(ASEmitterTokens.THIS);
+                        write(ASEmitterTokens.MEMBER_ACCESS);
+                        write(varname);
+                        write(ASEmitterTokens.SPACE);
+                        writeToken(ASEmitterTokens.EQUAL);
+                        write(ASEmitterTokens.SQUARE_OPEN);
+                        boolean firstOne = true;
+                        for (int j = 0; j < m; j++)
+                        {
+                            IMXMLInstanceNode valueNode = (IMXMLInstanceNode)(arrayNode.getChild(j));
+                            if (firstOne)
+                                firstOne = false;
+                            else
+                                writeToken(ASEmitterTokens.COMMA);
+                            write(instanceToString(valueNode));
+                        }
+                        write(ASEmitterTokens.SQUARE_CLOSE);
+                        write(ASEmitterTokens.SEMICOLON);
+                    }
 		            break;
 				}
 				case MXMLXMLID:
@@ -3539,6 +3768,31 @@
 					}
 		            break;
 				}
+	    		case MXMLBooleanID:
+	    		case MXMLNumberID:
+	    		case MXMLIntID:
+	    		case MXMLUintID:
+				{
+	    			IMXMLExpressionNode scalarNode = (IMXMLExpressionNode)declNode;
+                    IASNode expressionNode = scalarNode.getExpressionNode();
+                    // it might be a binding expression instead of a literal
+                    if (expressionNode instanceof IMXMLLiteralNode)
+                    {
+                        varname = scalarNode.getEffectiveID();
+                        writeNewline();
+                        write(ASEmitterTokens.THIS);
+                        write(ASEmitterTokens.MEMBER_ACCESS);
+                        write(varname);
+                        write(ASEmitterTokens.SPACE);
+                        writeToken(ASEmitterTokens.EQUAL);
+                        IMXMLLiteralNode valueNode = (IMXMLLiteralNode) expressionNode;
+                        Object value = valueNode.getValue();
+                        write(value.toString());
+                        write(ASEmitterTokens.SEMICOLON);
+                    }
+	                break;
+				}
+
     		}
     	}
     }
@@ -3567,7 +3821,75 @@
 	            return objectToString(value);
     		}
     		else
+            {
     			return "''";
+            }
+    	}
+    	else if (instanceNode instanceof IMXMLObjectNode)
+    	{
+    		IMXMLObjectNode objectNode = (IMXMLObjectNode)instanceNode;
+            StringBuilder sb = new StringBuilder();
+            sb.append(ASEmitterTokens.BLOCK_OPEN.getToken());
+            int m = objectNode.getChildCount();
+        	boolean firstOne = true;
+            for (int j = 0; j < m; j++)
+            {
+            	if (firstOne)
+                {
+            		firstOne = false;
+                }
+                else
+                {
+                    sb.append(ASEmitterTokens.COMMA.getToken());
+                    sb.append(ASEmitterTokens.SPACE.getToken());
+                }
+                IMXMLPropertySpecifierNode propName = (IMXMLPropertySpecifierNode)objectNode.getChild(j);
+                sb.append(propName.getName());
+                sb.append(ASEmitterTokens.COLON.getToken());
+                sb.append(ASEmitterTokens.SPACE.getToken());
+                IMXMLInstanceNode valueNode = propName.getInstanceNode();
+	            sb.append(instanceToString(valueNode));
+            }
+            sb.append(ASEmitterTokens.BLOCK_CLOSE.getToken());
+            return sb.toString();
+    	}
+    	else if (instanceNode instanceof IMXMLArrayNode)
+    	{
+    		IMXMLArrayNode arrayNode = (IMXMLArrayNode)instanceNode;
+            StringBuilder sb = new StringBuilder();
+            sb.append(ASEmitterTokens.SQUARE_OPEN.getToken());
+            int m = arrayNode.getChildCount();
+        	boolean firstOne = true;
+            for (int j = 0; j < m; j++)
+            {
+	            IMXMLInstanceNode valueNode = (IMXMLInstanceNode)(arrayNode.getChild(j));
+            	if (firstOne)
+                {
+            		firstOne = false;
+                }
+            	else
+                {
+            		sb.append(ASEmitterTokens.COMMA.getToken());
+            		sb.append(ASEmitterTokens.SPACE.getToken());
+                }
+	            sb.append(instanceToString(valueNode));
+            }
+            sb.append(ASEmitterTokens.SQUARE_CLOSE.getToken());
+            return sb.toString();
+    	}
+    	else if ((instanceNode instanceof IMXMLIntNode) ||
+    			(instanceNode instanceof IMXMLUintNode) ||
+    			(instanceNode instanceof IMXMLNumberNode) ||
+    			(instanceNode instanceof IMXMLBooleanNode))
+    	{
+    		IMXMLExpressionNode scalarNode = (IMXMLExpressionNode)instanceNode;
+    		IASNode vNode = scalarNode.getExpressionNode();
+    		if (vNode instanceof IMXMLLiteralNode)
+    		{
+	            IMXMLLiteralNode valueNode = (IMXMLLiteralNode)vNode;
+	            Object value = valueNode.getValue();
+	            return value.toString();
+    		}
     	}
     	return "";
     }
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 d823a33..3c93e7d 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
 {
@@ -103,6 +104,7 @@
     private boolean useStrictPublishing;
     private List<String> additionalHTML = new ArrayList<String>();
     private Set<String> closurePropertyNamesToKeep;
+    private Set<String> closureSymbolNamesToExport;
 
     private GoogDepsWriter getGoogDepsWriter(File intermediateDir, 
     										String mainClassQName, 
@@ -188,6 +190,11 @@
         closurePropertyNamesToKeep = propertyNames;
     }
 
+    public void setClosureSymbolNamesToExport(Set<String> symbolNames)
+    {
+        closureSymbolNamesToExport = symbolNames;
+    }
+
     @Override
     public boolean publish(ProblemQuery problems) throws IOException
     {
@@ -387,6 +394,13 @@
         {
             compilerWrapper = new JSClosureCompilerWrapper(googConfiguration.getJSCompilerOptions());
             compilerWrapper.setPropertyNamesToKeep(closurePropertyNamesToKeep);
+            if (closureSymbolNamesToExport == null) {
+                closureSymbolNamesToExport = new HashSet<String>();
+            }
+            //the HTML template always needs this name to be exported, even if
+            //other class names are not exported
+            closureSymbolNamesToExport.add(mainClassQName);
+            compilerWrapper.setExtraSymbolNamesToExport(closureSymbolNamesToExport);
         }
 
         if (compilerWrapper != null)
@@ -398,8 +412,6 @@
             for (SourceFile closureSourceFile : closureSourceFiles) {
                 compilerWrapper.addJSSourceFile(closureSourceFile);
             }
-
-            writeExportedNames(compilerWrapper);
         }
 
         /////////////////////////////////////////////////////////////////////////////////
@@ -504,41 +516,45 @@
         // is generated here so it can be used for outputting the html templates.
         String depsFileData = gdw.generateDeps(project, problems);
 
-        // FOR MODULES: this generate inject_html lines for js to be added to __deps.js
-        String moduleAdditionHTML = "";
+        // FOR MODULES: this generates inject_script lines for js to be added to __deps.js
+        String additionalScript = "";
 
         if (project.isModule(mainClassQName))
         {
             for (String s : additionalHTML)
             {
-                moduleAdditionHTML += "document.head.innerHTML += '"+ s.trim() + "';";
+                additionalScript += s.trim() + System.lineSeparator();
             }
             
         	// need better test someday
         	depsFileData += "\ngoog.require('" + mainClassQName + "');\n";
-            writeFile(new File(intermediateDir, projectName + "__deps.js"), depsFileData + moduleAdditionHTML + "\n", false);
+            writeFile(new File(intermediateDir, projectName + "__deps.js"), depsFileData + additionalScript + "\n", false);
             gdw.needCSS = true;
             if (configuration.release()) {
-            	writeFile(new File(releaseDir, projectName + ".js"), moduleAdditionHTML, false);
+            	writeFile(new File(releaseDir, projectName + ".js"), additionalScript, false);
             }
         }
         else
         {
 	        File template = ((JSGoogConfiguration)configuration).getHtmlTemplate();
+			List<String> wrappedScript = new ArrayList<String>();
+			wrappedScript.add("<script type=\"text/javascript\">");
+			wrappedScript.addAll(additionalHTML);
+			wrappedScript.add("</script>");
 	        // Create the index.html for the debug-js version.
 	        if (!((JSGoogConfiguration)configuration).getSkipTranspile()) {
 	            if (template != null) {
-	                writeTemplate(template, "intermediate", projectName, mainClassQName, intermediateDir, depsFileData, additionalHTML);
+	                writeTemplate(template, "intermediate", projectName, mainClassQName, intermediateDir, depsFileData, wrappedScript);
 	            } else {
-	                writeHTML("intermediate", projectName, mainClassQName, intermediateDir, depsFileData, additionalHTML);
+	                writeHTML("intermediate", projectName, mainClassQName, intermediateDir, depsFileData, wrappedScript);
 	            }
 	        }
 	        // Create the index.html for the release-js version.
 	        if (configuration.release()) {
 	            if (template != null) {
-	                writeTemplate(template, "release", projectName, mainClassQName, releaseDir, depsFileData, additionalHTML);
+	                writeTemplate(template, "release", projectName, mainClassQName, releaseDir, depsFileData, wrappedScript);
 	            } else {
-	                writeHTML("release", projectName, mainClassQName, releaseDir, null, additionalHTML);
+	                writeHTML("release", projectName, mainClassQName, releaseDir, null, wrappedScript);
 	            }
 	        }
         }        
@@ -570,14 +586,15 @@
             compilerWrapper.targetFilePath = projectReleaseMainFile.getCanonicalPath();
             compilerWrapper.setSourceMap(googConfiguration.getSourceMap());
             compilerWrapper.setVerbose(googConfiguration.isVerbose());
+            compilerWrapper.setPreventRenameMxmlSymbolReferences(googConfiguration.getPreventRenameMxmlSymbolReferences());
 
             ok = compilerWrapper.compile();
 
-            // FOR MODULES: add moduleAdditionHTML to main js release file too
+            // FOR MODULES: add additionalScript to main js release file too
             if (project.isModule(mainClassQName))
             {
                 StringBuilder appendString = new StringBuilder();
-                appendString.append(moduleAdditionHTML);
+                appendString.append(additionalScript);
                 writeFile(projectReleaseMainFile, appendString.toString(), true);
             }
 
@@ -677,17 +694,17 @@
     {
         boolean inDocComment = false;
         boolean inConstructor = false;
-        boolean inInjectHTML = false;
+        boolean inInjectScript = false;
 	    for (int i = 0; i < lines.size(); i++)
 	    {
             String line = lines.get(i);
             if (inDocComment)
             {
-                if (inInjectHTML)
+                if (inInjectScript)
                 {
-                    if (line.indexOf("</inject_html>") > -1)
+                    if (line.indexOf("</inject_script>") > -1)
                     {
-                        inInjectHTML = false;
+                        inInjectScript = false;
                         continue;
                     }
                     line = line.trim();
@@ -696,10 +713,10 @@
                     additionalHTML.add(line);
                     continue;
                 }
-                int c = line.indexOf("<inject_html>");
+                int c = line.indexOf("<inject_script>");
                 if (c != -1)
                 {
-                    inInjectHTML = true;
+                    inInjectScript = true;
                     continue;
                 }
                 if (!inConstructor)
@@ -719,7 +736,7 @@
                         //we're done
                         break;
                     }
-                    inInjectHTML = false;
+                    inInjectScript = false;
                     inDocComment = false;
                     inConstructor = false;
                 }
@@ -844,6 +861,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
 	{
@@ -868,31 +889,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);
 	}
@@ -1098,41 +1119,6 @@
         return true;
     }
     
-    private void writeExportedNames(JSClosureCompilerWrapper compilerWrapper)
-    {
-    	if (!googConfiguration.getExportPublicSymbols())
-    	{
-    		// if not generating exports for every public symbol
-    		// generate an externs file that blocks renaming
-    		// of properties used by MXML and dataBinding.
-	        Set<String> exportedNames = project.getExportedNames();
-	        if (exportedNames.size() > 0)
-	        {
-	        	StringBuilder sb = new StringBuilder();
-	        	sb.append("/**\n");
-	        	sb.append(" * generated by Apache Royale compiler\n");
-	        	sb.append(" * @externs\n");
-	        	sb.append(" */\n");
-	        	for (String name : exportedNames)
-	        	{
-	        		sb.append("\n\n");
-		        	sb.append("/**\n");
-		        	sb.append(" * @export\n");
-		        	sb.append(" */\n");
-		        	sb.append("Object.prototype." + name + ";\n");
-	        	}
-	        	File exportsFile = new File(outputFolder, "dontrename.js");
-	        	try {
-					writeFile(exportsFile, sb.toString(), false);
-				} catch (IOException e) {
-					// TODO Auto-generated catch block
-					e.printStackTrace();
-				}
-	        	compilerWrapper.addJSExternsFile(exportsFile.getAbsolutePath());
-	        }
-    	}
-    }
-    
     private String getFactoryClass(IMetaTag node)
     {
     	if (node == null) return null;
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/driver/js/goog/JSGoogCompcConfiguration.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/driver/js/goog/JSGoogCompcConfiguration.java
index a63a741..53ee681 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/driver/js/goog/JSGoogCompcConfiguration.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/driver/js/goog/JSGoogCompcConfiguration.java
@@ -441,6 +441,25 @@
     	exportProtectedSymbols = value;
     }
 
+    //
+    // 'export-internal-symbols'
+    //
+
+    private boolean exportInternalSymbols = false;
+
+    public boolean getExportInternalSymbols()
+    {
+        return exportInternalSymbols;
+    }
+
+    @Config
+    @Mapping("export-internal-symbols")
+    public void setExportInternalSymbols(ConfigurationValue cv, boolean value)
+            throws ConfigurationException
+    {
+    	exportInternalSymbols = value;
+    }
+
     
     //
     // 'warn-public-vars'
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 1d813e4..5c00370 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
@@ -444,6 +444,44 @@
     {
     	exportProtectedSymbols = value;
     }
+    
+    //
+    // 'export-internal-symbols'
+    //
+
+    private boolean exportInternalSymbols = false;
+
+    public boolean getExportInternalSymbols()
+    {
+        return exportInternalSymbols;
+    }
+
+    @Config
+    @Mapping("export-internal-symbols")
+    public void setExportInternalSymbols(ConfigurationValue cv, boolean value)
+            throws ConfigurationException
+    {
+    	exportInternalSymbols = value;
+    }
+
+    //
+    // 'prevent-rename-mxml-symbol-references'
+    //
+
+    private boolean preventRenameMxmlSymbolReferences = true;
+
+    public boolean getPreventRenameMxmlSymbolReferences()
+    {
+        return preventRenameMxmlSymbolReferences;
+    }
+
+    @Config
+    @Mapping("prevent-rename-mxml-symbol-references")
+    public void setPreventRenameMxmlSymbolReferences(ConfigurationValue cv, boolean value)
+            throws ConfigurationException
+    {
+    	preventRenameMxmlSymbolReferences = value;
+    }
 
     //
     // 'prevent-rename-public-symbols'
@@ -465,6 +503,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'
     //
 
@@ -483,6 +635,292 @@
     	preventRenameProtectedSymbols = value;
     }
 
+    //
+    // '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'
+    //
+
+    private boolean preventRenameInternalSymbols = true;
+
+    public boolean getPreventRenameInternalSymbols()
+    {
+        return preventRenameInternalSymbols;
+    }
+
+    @Config
+    @Mapping("prevent-rename-internal-symbols")
+    public void setPreventRenameInternalSymbols(ConfigurationValue cv, boolean value)
+            throws ConfigurationException
+    {
+    	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;
+    }
+
+    
+    //
+    // 'allow-dynamic-bindings'
+    //
+
+    private boolean allowDynamicBindings = true;
+
+    public boolean getAllowDynamicBindings()
+    {
+        return allowDynamicBindings;
+    }
+
+    @Config
+    @Mapping("allow-dynamic-bindings")
+    public void setAllowDynamicBindings(ConfigurationValue cv, boolean value)
+            throws ConfigurationException
+    {
+    	allowDynamicBindings = value;
+    }
+
+    //
+    // 'mxml-reflect-object-property'
+    //
+
+    private boolean mxmlReflectObjectProperty = false;
+
+    public boolean getMxmlReflectObjectProperty()
+    {
+        return mxmlReflectObjectProperty;
+    }
+
+    @Config
+    @Mapping("mxml-reflect-object-property")
+    public void setMxmlReflectObjectProperty(ConfigurationValue cv, boolean value)
+            throws ConfigurationException
+    {
+    	mxmlReflectObjectProperty = value;
+    }
+
     
     //
     // 'warn-public-vars'
@@ -539,12 +977,14 @@
         final int HAS_KEEP_CODE_WITH_METADATA = 4;
         final int HAS_EXPORT_PUBLIC_SYMBOLS = 8;
         final int EXPORT_PROTECTED_SYMBOLS = 16;
+        final int EXPORT_INTERNAL_SYMBOLS = 32;
     
         if (getJsDefaultInitializers()) ret |= WITH_DEFAULT_INITIALIZERS;
         if (getCompilerKeepAs3Metadata().size() > 0) ret |= HAS_KEEP_AS3_METADATA;
         if (getCompilerKeepCodeWithMetadata().size() > 0) ret |= HAS_KEEP_CODE_WITH_METADATA;
         if (getExportPublicSymbols()) ret |= HAS_EXPORT_PUBLIC_SYMBOLS;
         if (getExportProtectedSymbols()) ret |= EXPORT_PROTECTED_SYMBOLS;
+        if (getExportInternalSymbols()) ret |= EXPORT_INTERNAL_SYMBOLS;
         
         return ret;
     }
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/driver/js/royale/JSCSSCompilationSession.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/driver/js/royale/JSCSSCompilationSession.java
index 88a5d49..2b9d067 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/driver/js/royale/JSCSSCompilationSession.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/driver/js/royale/JSCSSCompilationSession.java
@@ -347,10 +347,22 @@
     
     private String escapeDoubleQuotes(String s)
     {
+        s = replaceUnicodeEncoded(s);
     	if (s.contains("\""))
     		s = s.replace("\"", "\\\"");
     	return s;
     }
+
+    private String replaceUnicodeEncoded(String s)
+    {
+        //almost all escape sequences are converted to actual character sequences, except for some that don't have
+        //a good result for Character.toChars (e.g. zero width space or non-breaking-space)
+        //convert hex char values to unicode
+        if (s.matches("\\\\[0-9a-fA-F]{1,4}")) {
+            s = s.replaceAll("\\\\([0-9a-fA-F]{1,4})\\s?","\\\\u$1");
+        }
+        return s;
+    }
     
     private String encodeRule(ICSSRule rule)
     {
@@ -378,7 +390,6 @@
 
         ImmutableList<ICSSSelector> slist = rule.getSelectorGroup();
         result.append(slist.size());
-
         for (ICSSSelector sel : slist)
         {
             result.append(",\n");
@@ -525,7 +536,7 @@
             }
             else if (value instanceof CSSStringPropertyValue)
             {
-                line.append("\"" + ((CSSStringPropertyValue)value).getValue() + "\"");
+                line.append("\"" + replaceUnicodeEncoded(((CSSStringPropertyValue)value).getValue()) + "\"");
             }
             else if (value instanceof CSSColorPropertyValue)
             {
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 9feedaa..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)
 	{
@@ -1079,7 +1039,7 @@
 	    fi.suppressLine = -1;
 	    fi.fileoverviewLine = -1;
 		fi.googProvideLine = -1;
-		boolean inInjectHTML = false;
+		boolean inInjectScript = false;
 	    for (int i = 0; i < n; i++)
 	    {
 	        String line = lines.get(i);
@@ -1091,11 +1051,11 @@
 	        }
 	        else
 	        {
-		        if (inInjectHTML)
+		        if (inInjectScript)
 	            {
-	                if (line.indexOf("</inject_html>") > -1)
+	                if (line.indexOf("</inject_script>") > -1)
 	                {
-	                    inInjectHTML = false;
+	                    inInjectScript = false;
 	                    continue;
 	                }
 	            	line = line.trim();
@@ -1104,10 +1064,10 @@
 				    additionalHTML.add(line);
 				    continue;
 	            }
-                c = line.indexOf("<inject_html>");
+                c = line.indexOf("<inject_script>");
                 if (c > -1)
                 {
-                    inInjectHTML = true;
+                    inInjectScript = true;
                 }
 		        c = line.indexOf("@constructor");
 		        if (c > -1)
@@ -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/internal/projects/RoyaleJSProject.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleJSProject.java
index acb4a2e..beedbe9 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleJSProject.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleJSProject.java
@@ -39,6 +39,7 @@
 import org.apache.royale.compiler.config.Configurator;
 import org.apache.royale.compiler.css.ICSSMediaQueryCondition;
 import org.apache.royale.compiler.css.ICSSRule;
+import org.apache.royale.compiler.definitions.IClassDefinition;
 import org.apache.royale.compiler.definitions.IDefinition;
 import org.apache.royale.compiler.definitions.IFunctionDefinition;
 import org.apache.royale.compiler.definitions.ITypeDefinition;
@@ -48,6 +49,7 @@
 import org.apache.royale.compiler.definitions.references.ReferenceFactory;
 import org.apache.royale.compiler.driver.IBackend;
 import org.apache.royale.compiler.internal.codegen.js.royale.JSRoyaleEmitterTokens;
+import org.apache.royale.compiler.internal.codegen.js.utils.EmitterUtils;
 import org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyaleEmitterTokens;
 import org.apache.royale.compiler.internal.common.JSModuleRequireDescription;
 import org.apache.royale.compiler.internal.css.codegen.CSSCompilationSession;
@@ -68,6 +70,7 @@
 import org.apache.royale.compiler.tree.as.IDefinitionNode;
 import org.apache.royale.compiler.tree.as.IDocumentableDefinitionNode;
 import org.apache.royale.compiler.tree.as.IInterfaceNode;
+import org.apache.royale.compiler.tree.mxml.IMXMLClassDefinitionNode;
 import org.apache.royale.compiler.units.ICompilationUnit;
 import org.apache.royale.compiler.units.ICompilationUnit.UnitType;
 import org.apache.royale.swc.ISWC;
@@ -522,9 +525,10 @@
     }
     
     @Override
-    public String getGeneratedIDBase()
+    public String getGeneratedIDBase(IMXMLClassDefinitionNode definitionNode)
     {
-        return MXMLRoyaleEmitterTokens.ID_PREFIX.getToken();
+        IClassDefinition classDefinition = definitionNode.getDefinition();
+        return EmitterUtils.getClassDepthNameBase(MXMLRoyaleEmitterTokens.ID_PREFIX.getToken(), classDefinition, this);
     }
 
     public ITargetAttributes computeTargetAttributes()
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 b94fdf2..fdf611c 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
@@ -19,14 +19,24 @@
 
 package org.apache.royale.compiler.utils;
 
+import java.util.LinkedHashSet;
 import java.util.Set;
 
+import org.apache.royale.compiler.asdoc.royale.ASDocComment;
+import org.apache.royale.compiler.definitions.IAccessorDefinition;
 import org.apache.royale.compiler.definitions.IDefinition;
 import org.apache.royale.compiler.definitions.IFunctionDefinition;
+import org.apache.royale.compiler.definitions.INamespaceDefinition;
+import org.apache.royale.compiler.definitions.IPackageDefinition;
 import org.apache.royale.compiler.definitions.ITypeDefinition;
 import org.apache.royale.compiler.definitions.IVariableDefinition;
+import org.apache.royale.compiler.definitions.IVariableDefinition.VariableClassification;
+import org.apache.royale.compiler.definitions.references.INamespaceReference;
+import org.apache.royale.compiler.internal.codegen.js.royale.JSRoyaleEmitter;
+import org.apache.royale.compiler.internal.codegen.js.utils.DocEmitterUtils;
 import org.apache.royale.compiler.internal.projects.RoyaleJSProject;
-import org.apache.royale.compiler.internal.scopes.ASProjectScope.DefinitionPromise;
+import org.apache.royale.compiler.scopes.IASScope;
+import org.apache.royale.compiler.scopes.IFileScope;
 import org.apache.royale.compiler.units.ICompilationUnit;
 
 public class ClosureUtils
@@ -37,50 +47,316 @@
         {
             return;
         }
-		boolean preventRenamePublic = project.config.getPreventRenamePublicSymbols();
-		boolean preventRenameProtected = project.config.getPreventRenameProtectedSymbols();
-        for (IDefinition def : cu.getDefinitionPromises())
+        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
         {
-            if(def instanceof DefinitionPromise)
+            for(IASScope scope : cu.getFileScopeRequest().get().getScopes())
             {
-                def = ((DefinitionPromise) def).getActualDefinition();
-            }
-            if (def instanceof ITypeDefinition)
-            {
-                if (def.isImplicit() || def.isNative())
+                for(IDefinition def : scope.getAllLocalDefinitions())
                 {
-                    continue;
-                }
-                ITypeDefinition typeDef = (ITypeDefinition) def;
-                for (IDefinition localDef : typeDef.getContainedScope().getAllLocalDefinitions())
-                {
-                    if (localDef.isImplicit())
+                    if(def instanceof IPackageDefinition)
                     {
-                        continue;
+                        //source files seem to return packages while SWC files
+                        //return symbols inside the packages
+                        //we want the symbols, so drill down into the package
+                        IPackageDefinition packageDef = (IPackageDefinition) def;
+                        def = packageDef.getContainedScope().getAllLocalDefinitions().iterator().next();
                     }
-                    if (!localDef.isPublic() && !localDef.isProtected())
+                    if(scope instanceof IFileScope && def.isPrivate())
                     {
-                        continue;
+                        //file-private symbols are emitted like static variables
+                        result.add(def.getBaseName());
                     }
-                    if (localDef.isProtected() && !preventRenameProtected)
+                    if (def instanceof IVariableDefinition
+                            && !(def instanceof IAccessorDefinition))
                     {
-                        continue;
+                        IVariableDefinition varDef = (IVariableDefinition) def;
+                        if (varDef.getVariableClassification().equals(VariableClassification.PACKAGE_MEMBER)) {
+                            result.add(def.getBaseName());
+                        }
                     }
-                    if (localDef.isPublic() && !preventRenamePublic)
+                    if (def instanceof ITypeDefinition)
                     {
-                        continue;
+                        if (def.isImplicit() || def.isNative())
+                        {
+                            continue;
+                        }
+                        ITypeDefinition typeDef = (ITypeDefinition) def;
+                        for (IDefinition localDef : typeDef.getContainedScope().getAllLocalDefinitions())
+                        {
+                            if (localDef.isImplicit() || localDef.isPrivate())
+                            {
+                                continue;
+                            }
+                            INamespaceReference nsRef = localDef.getNamespaceReference();
+                            boolean isCustomNS = !nsRef.isLanguageNamespace();
+                            boolean isMethod = localDef instanceof IFunctionDefinition
+                                && !(localDef instanceof IAccessorDefinition);
+                            boolean isVar = localDef instanceof IVariableDefinition
+                                && !(localDef instanceof IAccessorDefinition)
+                                && !localDef.isBindable();
+                            boolean isAccessor = localDef instanceof IAccessorDefinition
+                                || (localDef instanceof IVariableDefinition && localDef.isBindable());
+                            if(localDef.isPublic() || isCustomNS)
+                            {
+                                if(!preventRenamePublicSymbols)
+                                {
+                                    continue;
+                                }
+                                if(localDef.isStatic())
+                                {
+                                    if(isMethod && !preventRenamePublicStaticMethods)
+                                    {
+                                        continue;
+                                    }
+                                    else if(isVar && !preventRenamePublicStaticVariables)
+                                    {
+                                        continue;
+                                    }
+                                    else if(isAccessor && !preventRenamePublicStaticAccessors)
+                                    {
+                                        continue;
+                                    }
+                                }
+                                else // instance
+                                {
+                                    if(isMethod && !preventRenamePublicInstanceMethods)
+                                    {
+                                        continue;
+                                    }
+                                    else if(isVar && !preventRenamePublicInstanceVariables)
+                                    {
+                                        continue;
+                                    }
+                                    else if(isAccessor && !preventRenamePublicInstanceAccessors)
+                                    {
+                                        continue;
+                                    }
+                                }
+                            }
+                            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);
+                        }
                     }
-                    if (!(localDef instanceof IVariableDefinition))
-                    {
-                        continue;
-                    }
-                    if (localDef instanceof IFunctionDefinition)
-                    {
-                        continue;
-                    }
-                    result.add(localDef.getBaseName());
                 }
             }
         }
-    } 
+        catch(InterruptedException e) {}
+    }
+
+    //the result must be a LinkedHashSet so that it iterates over the keys in
+    //the same order that they were added
+    public static void collectSymbolNamesToExport(ICompilationUnit cu, RoyaleJSProject project, LinkedHashSet<String> symbolsResult)
+    {
+        if (project.isExternalLinkage(cu))
+        {
+            return;
+        }
+        boolean exportPublic = project.config != null && project.config.getExportPublicSymbols();
+        boolean exportProtected = project.config != null && project.config.getExportProtectedSymbols();
+        boolean exportInternal = project.config != null && project.config.getExportInternalSymbols();
+        try
+        {
+            String parentQName = null;
+            Set<String> filePrivateNames = new LinkedHashSet<String>();
+            for(IASScope scope : cu.getFileScopeRequest().get().getScopes())
+            {
+                for(IDefinition def : scope.getAllLocalDefinitions())
+                {
+                    if(def instanceof IPackageDefinition)
+                    {
+                        //source files seem to return packages while SWC files
+                        //return symbols inside the packages
+                        //we want the symbols, so drill down into the package
+                        IPackageDefinition packageDef = (IPackageDefinition) def;
+                        def = packageDef.getContainedScope().getAllLocalDefinitions().iterator().next();
+                    }
+                    if (def.isImplicit() || def.isNative())
+                    {
+                        continue;
+                    }
+
+                    String qualifiedName = def.getQualifiedName();
+                    boolean isFilePrivate = false;
+                    if(scope instanceof IFileScope && def.isPrivate())
+                    {
+                        isFilePrivate = true;
+                        filePrivateNames.add(qualifiedName);
+                    }
+                    else
+                    {
+                        if (project.isExterns(qualifiedName))
+                        {
+                            return;
+                        }
+                        symbolsResult.add(qualifiedName);
+                        if(parentQName == null)
+                        {
+                            parentQName = qualifiedName;
+                        }
+                    }
+                    if (def instanceof ITypeDefinition)
+                    {
+                        ITypeDefinition typeDef = (ITypeDefinition) def;
+                        ASDocComment asDoc = (ASDocComment) typeDef.getExplicitSourceComment();
+                        if (asDoc != null && DocEmitterUtils.hasSuppressExport(null, asDoc.commentNoEnd()))
+                        {
+                            continue;
+                        }
+
+                        for(IDefinition localDef : typeDef.getContainedScope().getAllLocalDefinitions())
+                        {
+                            if (localDef.isImplicit())
+                            {
+                                continue;
+                            }
+                            boolean isMethod = localDef instanceof IFunctionDefinition
+                                && !(localDef instanceof IAccessorDefinition);
+                            boolean isVar = localDef instanceof IVariableDefinition
+                                && !(localDef instanceof IAccessorDefinition)
+                                && !localDef.isBindable();
+                            boolean isAccessor = localDef instanceof IAccessorDefinition
+                                || (localDef instanceof IVariableDefinition && localDef.isBindable());
+                            if (isMethod || isVar || isAccessor)
+                            {
+                                INamespaceReference nsRef = localDef.getNamespaceReference();
+                                boolean isCustomNS = !nsRef.isLanguageNamespace();
+                                if ((localDef.isPublic() && exportPublic)
+                                        || (isCustomNS && exportPublic)
+                                        || (localDef.isProtected() && exportProtected)
+                                        || (localDef.isInternal() && exportInternal))
+                                {
+                                    String baseName = localDef.getBaseName();
+                                    if (isCustomNS)
+                                    {
+                                        String uri = nsRef.resolveNamespaceReference(project).getURI();
+                                        baseName = JSRoyaleEmitter.formatNamespacedProperty(uri, localDef.getBaseName(), false);
+                                    }
+                                    if (isFilePrivate)
+                                    {
+                                        filePrivateNames.add(qualifiedName + (localDef.isStatic() ? "." : ".prototype.") + baseName);
+                                    }
+                                    else
+                                    {
+                                        symbolsResult.add(qualifiedName + (localDef.isStatic() ? "." : ".prototype.") + baseName);
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+            for(String filePrivateName : filePrivateNames)
+            {
+                symbolsResult.add(parentQName + "." + filePrivateName);
+            }
+        }
+        catch(InterruptedException e) {}
+    }
 }
\ No newline at end of file
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/utils/DefinitionUtils.java b/compiler-jx/src/main/java/org/apache/royale/compiler/utils/DefinitionUtils.java
index 80b0ae4..40ec8e5 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/utils/DefinitionUtils.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/utils/DefinitionUtils.java
@@ -22,6 +22,7 @@
 import org.apache.royale.compiler.definitions.IClassDefinition;
 import org.apache.royale.compiler.definitions.IDefinition;
 import org.apache.royale.compiler.definitions.IInterfaceDefinition;
+import org.apache.royale.compiler.projects.ICompilerProject;
 
 /**
  * @author Michael Schmalle
@@ -34,4 +35,15 @@
                 && (definition.getParent() instanceof IClassDefinition || definition
                         .getParent() instanceof IInterfaceDefinition);
     }
+
+
+    public static final int deltaFromObject(IClassDefinition definition, ICompilerProject project) {
+        int ret = -1;
+        if (definition != null) {
+            return definition.resolveAncestry(project).length - 1;
+        }
+        return ret;
+    }
+
+
 }
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/utils/JSClosureCompilerWrapper.java b/compiler-jx/src/main/java/org/apache/royale/compiler/utils/JSClosureCompilerWrapper.java
index 0364d35..b93f276 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/utils/JSClosureCompilerWrapper.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/utils/JSClosureCompilerWrapper.java
@@ -89,10 +89,12 @@
     private String propertyMapOutputPath;
     private String variableMapInputPath;
     private String propertyMapInputPath;
+    private Set<String> propertyNamesToKeep;
+    private Set<String> extraSymbolNamesToExport;
     private boolean skipTypeInference;
     private boolean sourceMap = false;
     private boolean verbose = false;
-    private Set<String> propertyNamesToKeep;
+    private boolean preventRenameMxmlSymbolReferences = true;
     
     public String targetFilePath;
     
@@ -126,10 +128,20 @@
         verbose = enabled;
     }
 
+    public void setPreventRenameMxmlSymbolReferences(boolean enabled)
+    {
+        preventRenameMxmlSymbolReferences = enabled;
+    }
+
     public void setPropertyNamesToKeep(Set<String> propertyNames)
     {
         propertyNamesToKeep = propertyNames;
     }
+
+    public void setExtraSymbolNamesToExport(Set<String> names)
+    {
+        extraSymbolNamesToExport = names;
+    }
     
     public boolean compile()
     {
@@ -167,7 +179,8 @@
 
         compiler_.setPassConfig(new RoyaleClosurePassConfig(options_, 
         		jsSourceFiles_.get(jsSourceFiles_.size() - 1).getName(), 
-        		variableMapInputPath == null ? null : new File(outputFolder, variableMapInputPath), propertyNamesToKeep));
+        		variableMapInputPath == null ? null : new File(outputFolder, variableMapInputPath),
+                propertyNamesToKeep, extraSymbolNamesToExport, preventRenameMxmlSymbolReferences));
         Result result = compiler_.compile(jsExternsFiles_, jsSourceFiles_, options_);
         
         try
@@ -401,7 +414,16 @@
             options_.setCrossChunkCodeMotion(true);
             options_.setCoalesceVariableNames(true);
             options_.setCrossChunkMethodMotion(true);
-            options_.setInlineProperties(true);
+            // we cannot guarantee that public member variables (called
+            // "properties" by closure) are constant because they may get
+            // set dynamically by the MXML data interpreter. closure assumes
+            // that a variable is constant if it cannot detect any code that
+            // makes changes, even if it isn't meant to be constant.
+            // in my tests, this kind of inlining happened very rarely, and
+            // there's virtually zero impact to file size by turning it off.
+            // however, there's a big upside to avoiding unexpected inlining
+            // that's very hard to debug. -JT
+            options_.setInlineProperties(false);
             options_.setInlineVariables(true);
             options_.setSmartNameRemoval(true);
             options_.setRemoveDeadCode(true);
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/goog/TestGoogClass.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/goog/TestGoogClass.java
index 67c4caa..961d4fe 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/goog/TestGoogClass.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/goog/TestGoogClass.java
@@ -188,7 +188,7 @@
         IClassNode node = getClassNode("public class A {public var a:Object;protected var b:String; "
                 + "private var c:int; internal var d:uint; var e:Number}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\norg.apache.royale.A = function() {\n};\n\n/**\n * @type {Object}\n */\norg.apache.royale.A.prototype.a;\n\n/**\n * @protected\n * @type {string}\n */\norg.apache.royale.A.prototype.b;\n\n/**\n * @private\n * @type {number}\n */\norg.apache.royale.A.prototype.c;\n\n/**\n * @type {number}\n */\norg.apache.royale.A.prototype.d;\n\n/**\n * @type {number}\n */\norg.apache.royale.A.prototype.e;");
+        assertOut("/**\n * @constructor\n */\norg.apache.royale.A = function() {\n};\n\n/**\n * @type {Object}\n */\norg.apache.royale.A.prototype.a;\n\n/**\n * @protected\n * @type {string}\n */\norg.apache.royale.A.prototype.b;\n\n/**\n * @private\n * @type {number}\n */\norg.apache.royale.A.prototype.c;\n\n/**\n * @package\n * @type {number}\n */\norg.apache.royale.A.prototype.d;\n\n/**\n * @package\n * @type {number}\n */\norg.apache.royale.A.prototype.e;");
     }
 
     @Override
@@ -220,7 +220,7 @@
                 + "foo_bar function get foo6():Object{return null;}"
                 + "foo_bar function set foo6(value:Object):void{}" + "}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\norg.apache.royale.A = function() {\n};\n\n/**\n * @type {Object}\n */\norg.apache.royale.A.prototype.foo1;\n\nObject.defineProperty(\n\torg.apache.royale.A.prototype, \n\t'foo1', \n\t{get:function() {\n\t\tvar self = this;\n\t\treturn null;\n\t}, configurable:true}\n);\n\nObject.defineProperty(\n\torg.apache.royale.A.prototype, \n\t'foo1', \n\t{set:function(value) {\n\t}, configurable:true}\n);\n\n/**\n * @protected\n * @type {Object}\n */\norg.apache.royale.A.prototype.foo2;\n\nObject.defineProperty(\n\torg.apache.royale.A.prototype, \n\t'foo2', \n\t{get:function() {\n\t\tvar self = this;\n\t\treturn null;\n\t}, configurable:true}\n);\n\nObject.defineProperty(\n\torg.apache.royale.A.prototype, \n\t'foo2', \n\t{set:function(value) {\n\t}, configurable:true}\n);\n\n/**\n * @private\n * @type {Object}\n */\norg.apache.royale.A.prototype.foo3;\n\nObject.defineProperty(\n\torg.apache.royale.A.prototype, \n\t'foo3', \n\t{get:function() {\n\t\tvar self = this;\n\t\treturn null;\n\t}, configurable:true}\n);\n\nObject.defineProperty(\n\torg.apache.royale.A.prototype, \n\t'foo3', \n\t{set:function(value) {\n\t}, configurable:true}\n);\n\n/**\n * @type {Object}\n */\norg.apache.royale.A.prototype.foo5;\n\nObject.defineProperty(\n\torg.apache.royale.A.prototype, \n\t'foo5', \n\t{get:function() {\n\t\tvar self = this;\n\t\treturn null;\n\t}, configurable:true}\n);\n\nObject.defineProperty(\n\torg.apache.royale.A.prototype, \n\t'foo5', \n\t{set:function(value) {\n\t}, configurable:true}\n);\n\n/**\n * @type {Object}\n */\norg.apache.royale.A.prototype.foo6;\n\nObject.defineProperty(\n\torg.apache.royale.A.prototype, \n\t'foo6', \n\t{get:function() {\n\t\tvar self = this;\n\t\treturn null;\n\t}, configurable:true}\n);\n\nObject.defineProperty(\n\torg.apache.royale.A.prototype, \n\t'foo6', \n\t{set:function(value) {\n\t}, configurable:true}\n);");
+        assertOut("/**\n * @constructor\n */\norg.apache.royale.A = function() {\n};\n\n/**\n * @type {Object}\n */\norg.apache.royale.A.prototype.foo1;\n\nObject.defineProperty(\n\torg.apache.royale.A.prototype, \n\t'foo1', \n\t{get:function() {\n\t\tvar self = this;\n\t\treturn null;\n\t}, configurable:true}\n);\n\nObject.defineProperty(\n\torg.apache.royale.A.prototype, \n\t'foo1', \n\t{set:function(value) {\n\t}, configurable:true}\n);\n\n/**\n * @protected\n * @type {Object}\n */\norg.apache.royale.A.prototype.foo2;\n\nObject.defineProperty(\n\torg.apache.royale.A.prototype, \n\t'foo2', \n\t{get:function() {\n\t\tvar self = this;\n\t\treturn null;\n\t}, configurable:true}\n);\n\nObject.defineProperty(\n\torg.apache.royale.A.prototype, \n\t'foo2', \n\t{set:function(value) {\n\t}, configurable:true}\n);\n\n/**\n * @private\n * @type {Object}\n */\norg.apache.royale.A.prototype.foo3;\n\nObject.defineProperty(\n\torg.apache.royale.A.prototype, \n\t'foo3', \n\t{get:function() {\n\t\tvar self = this;\n\t\treturn null;\n\t}, configurable:true}\n);\n\nObject.defineProperty(\n\torg.apache.royale.A.prototype, \n\t'foo3', \n\t{set:function(value) {\n\t}, configurable:true}\n);\n\n/**\n * @package\n * @type {Object}\n */\norg.apache.royale.A.prototype.foo5;\n\nObject.defineProperty(\n\torg.apache.royale.A.prototype, \n\t'foo5', \n\t{get:function() {\n\t\tvar self = this;\n\t\treturn null;\n\t}, configurable:true}\n);\n\nObject.defineProperty(\n\torg.apache.royale.A.prototype, \n\t'foo5', \n\t{set:function(value) {\n\t}, configurable:true}\n);\n\n/**\n * @type {Object}\n */\norg.apache.royale.A.prototype.foo6;\n\nObject.defineProperty(\n\torg.apache.royale.A.prototype, \n\t'foo6', \n\t{get:function() {\n\t\tvar self = this;\n\t\treturn null;\n\t}, configurable:true}\n);\n\nObject.defineProperty(\n\torg.apache.royale.A.prototype, \n\t'foo6', \n\t{set:function(value) {\n\t}, configurable:true}\n);");
     }
 
     @Override
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/goog/TestGoogFieldMembers.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/goog/TestGoogFieldMembers.java
index a1318d4..e410ab3 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/goog/TestGoogFieldMembers.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/goog/TestGoogFieldMembers.java
@@ -43,7 +43,7 @@
     {
         IVariableNode node = getField("var foo;");
         asBlockWalker.visitVariable(node);
-        assertOut("/**\n * @type {*}\n */\nRoyaleTest_A.prototype.foo");
+        assertOut("/**\n * @package\n * @type {*}\n */\nRoyaleTest_A.prototype.foo");
     }
 
     @Override
@@ -52,7 +52,7 @@
     {
         IVariableNode node = getField("var foo:int;");
         asBlockWalker.visitVariable(node);
-        assertOut("/**\n * @type {number}\n */\nRoyaleTest_A.prototype.foo");
+        assertOut("/**\n * @package\n * @type {number}\n */\nRoyaleTest_A.prototype.foo");
     }
 
     @Override
@@ -61,7 +61,7 @@
     {
         IVariableNode node = getField("var foo:int = 420;");
         asBlockWalker.visitVariable(node);
-        assertOut("/**\n * @type {number}\n */\nRoyaleTest_A.prototype.foo = 420");
+        assertOut("/**\n * @package\n * @type {number}\n */\nRoyaleTest_A.prototype.foo = 420");
     }
 
     @Test
@@ -69,7 +69,7 @@
     {
         IVariableNode node = getField("var foo:int = -420;");
         asBlockWalker.visitVariable(node);
-        assertOut("/**\n * @type {number}\n */\nRoyaleTest_A.prototype.foo = -420");
+        assertOut("/**\n * @package\n * @type {number}\n */\nRoyaleTest_A.prototype.foo = -420");
     }
 
     @Override
@@ -137,7 +137,7 @@
     {
         IVariableNode node = getField("static const foo;");
         asBlockWalker.visitVariable(node);
-        assertOut("/**\n * @const\n * @type {*}\n */\nRoyaleTest_A.foo");
+        assertOut("/**\n * @package\n * @const\n * @type {*}\n */\nRoyaleTest_A.foo");
     }
 
     @Test
@@ -145,7 +145,7 @@
     {
         IVariableNode node = getField("const foo;");
         asBlockWalker.visitVariable(node);
-        assertOut("/**\n * @const\n * @type {*}\n */\nRoyaleTest_A.prototype.foo");
+        assertOut("/**\n * @package\n * @const\n * @type {*}\n */\nRoyaleTest_A.prototype.foo");
     }
 
     @Override
@@ -154,7 +154,7 @@
     {
         IVariableNode node = getField("static const foo:int;");
         asBlockWalker.visitVariable(node);
-        assertOut("/**\n * @const\n * @type {number}\n */\nRoyaleTest_A.foo");
+        assertOut("/**\n * @package\n * @const\n * @type {number}\n */\nRoyaleTest_A.foo");
     }
 
     @Test
@@ -162,7 +162,7 @@
     {
         IVariableNode node = getField("const foo:int;");
         asBlockWalker.visitVariable(node);
-        assertOut("/**\n * @const\n * @type {number}\n */\nRoyaleTest_A.prototype.foo");
+        assertOut("/**\n * @package\n * @const\n * @type {number}\n */\nRoyaleTest_A.prototype.foo");
     }
 
     @Override
@@ -171,7 +171,7 @@
     {
         IVariableNode node = getField("static const foo:int = 420;");
         asBlockWalker.visitVariable(node);
-        assertOut("/**\n * @const\n * @type {number}\n */\nRoyaleTest_A.foo = 420");
+        assertOut("/**\n * @package\n * @const\n * @type {number}\n */\nRoyaleTest_A.foo = 420");
     }
 
     @Test
@@ -179,7 +179,7 @@
     {
         IVariableNode node = getField("const foo:int = 420;");
         asBlockWalker.visitVariable(node);
-        assertOut("/**\n * @const\n * @type {number}\n */\nRoyaleTest_A.prototype.foo = 420");
+        assertOut("/**\n * @package\n * @const\n * @type {number}\n */\nRoyaleTest_A.prototype.foo = 420");
     }
 
     @Override
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/goog/TestGoogGlobalConstants.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/goog/TestGoogGlobalConstants.java
index 985df6d..a3706c7 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/goog/TestGoogGlobalConstants.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/goog/TestGoogGlobalConstants.java
@@ -34,7 +34,7 @@
     @Test
     public void testInfinity()
     {
-        IVariableNode node = getField("var a:Number = Infinity;");
+        IVariableNode node = getField("public var a:Number = Infinity;");
         asBlockWalker.visitVariable(node);
         assertOut("/**\n * @type {number}\n */\nRoyaleTest_A.prototype.a = Infinity");
     }
@@ -43,7 +43,7 @@
     @Test
     public void testNegativeInfinity()
     {
-        IVariableNode node = getField("var a:Number = -Infinity;");
+        IVariableNode node = getField("public var a:Number = -Infinity;");
         asBlockWalker.visitVariable(node);
         assertOut("/**\n * @type {number}\n */\nRoyaleTest_A.prototype.a = -Infinity");
     }
@@ -52,7 +52,7 @@
     @Test
     public void testNaN()
     {
-        IVariableNode node = getField("var a:Number = NaN;");
+        IVariableNode node = getField("public var a:Number = NaN;");
         asBlockWalker.visitVariable(node);
         assertOut("/**\n * @type {number}\n */\nRoyaleTest_A.prototype.a = NaN");
     }
@@ -61,7 +61,7 @@
     @Test
     public void testUndefined()
     {
-        IVariableNode node = getField("var a:* = undefined;");
+        IVariableNode node = getField("public var a:* = undefined;");
         asBlockWalker.visitVariable(node);
         assertOut("/**\n * @type {*}\n */\nRoyaleTest_A.prototype.a = undefined");
     }
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 89e2c8d..958902d 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
@@ -37,9 +37,10 @@
         IClassNode node = (IClassNode) getNode("function get foo():int{}",
         		IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('RoyaleTest_A', RoyaleTest_A);\n\n\n" +
+        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n" +
+        "/**\n * @nocollapse\n * @type {number}\n */\nRoyaleTest_A.prototype.foo;\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
@@ -49,9 +50,10 @@
     	IClassNode node = (IClassNode) getNode("function get foo():int{return -1;}",
     			IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('RoyaleTest_A', RoyaleTest_A);\n\n\n" +
+        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n" +
+        "/**\n * @nocollapse\n * @type {number}\n */\nRoyaleTest_A.prototype.foo;\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
@@ -61,9 +63,10 @@
     	IClassNode node = (IClassNode) getNode("public function get foo():int{return -1;}",
         		IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('RoyaleTest_A', RoyaleTest_A);\n\n\n" +
+        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n" +
+        "/**\n * @nocollapse\n * @export\n * @type {number}\n */\nRoyaleTest_A.prototype.foo;\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
@@ -73,9 +76,9 @@
     	IClassNode node = (IClassNode) getNode("public class B extends A { public override function get foo():int{return super.foo;} }; public class A {public function get foo():int {return 0;}} ",
         		IClassNode.class, WRAP_LEVEL_PACKAGE);
         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/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('B', B);\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);");
+        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 * @type {number}\n */\nfoo: {\nget: B.prototype.get__foo}}\n);");
     }
 
     @Test
@@ -84,9 +87,9 @@
     	IClassNode node = (IClassNode) getNode("public class B extends A { public override function get foo():int{return super.foo;} }; public class A { public function set foo(value:int):void{} public function get foo():int {return 0;}}",
         		IClassNode.class, WRAP_LEVEL_PACKAGE);
         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/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('B', B);\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);");
+        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 * @type {number}\n */\nfoo: {\nget: B.prototype.get__foo,\nset: A.prototype.set__foo}}\n);");
     }
     
     @Override
@@ -96,9 +99,10 @@
     	IClassNode node = (IClassNode) getNode("public static function get foo():int{return -1;}",
         		IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('RoyaleTest_A', RoyaleTest_A);\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);");
+        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" +
+          "RoyaleTest_A.get__foo = function() {\n  return -1;\n};\n\n\n" +
+          "Object.defineProperties(RoyaleTest_A, /** @lends {RoyaleTest_A} */ {\n/**\n * @type {number}\n */\nfoo: {\nget: RoyaleTest_A.get__foo}}\n);");
     }
 
     @Override
@@ -108,10 +112,10 @@
     	IClassNode node = (IClassNode) getNode("function set foo(value:int):void{}",
         		IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-        // /**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('RoyaleTest_A', RoyaleTest_A);\n\n\nRoyaleTest_A.prototype.set__foo = function(value) {\n};\n\n\nObject.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n  * @type {number} */\nfoo: {\nset: RoyaleTest_A.prototype.set__foo}}\n);
-        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('RoyaleTest_A', RoyaleTest_A);\n\n\n" +
+        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n" +
+        "/**\n * @nocollapse\n * @type {number}\n */\nRoyaleTest_A.prototype.foo;\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
@@ -121,9 +125,10 @@
     	IClassNode node = (IClassNode) getNode("function set foo(value:int):void{fetch('haai');}",
         		IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('RoyaleTest_A', RoyaleTest_A);\n\n\n" +
+        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n" +
+        "/**\n * @nocollapse\n * @type {number}\n */\nRoyaleTest_A.prototype.foo;\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
@@ -133,9 +138,10 @@
     	IClassNode node = (IClassNode) getNode("public function set foo(value:int):void{}",
         		IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('RoyaleTest_A', RoyaleTest_A);\n\n\n" +
+        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n" +
+        "/**\n * @nocollapse\n * @export\n * @type {number}\n */\nRoyaleTest_A.prototype.foo;\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
@@ -145,9 +151,9 @@
     	IClassNode node = (IClassNode) getNode("public class B extends A { public override function set foo(value:int):void {super.foo = value;} }; public class A { public function set foo(value:int):void{}}",
         		IClassNode.class, WRAP_LEVEL_PACKAGE);
         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/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('B', B);\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);");
+        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 * @type {number}\n */\nfoo: {\nset: B.prototype.set__foo}}\n);");
     }
 
     @Override
@@ -157,9 +163,10 @@
     	IClassNode node = (IClassNode) getNode("public static function set foo(value:int):void{}",
         		IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('RoyaleTest_A', RoyaleTest_A);\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);");
+        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" +
+          "RoyaleTest_A.set__foo = function(value) {\n};\n\n\n" +
+          "Object.defineProperties(RoyaleTest_A, /** @lends {RoyaleTest_A} */ {\n/**\n * @type {number}\n */\nfoo: {\nset: RoyaleTest_A.set__foo}}\n);");
     }
 
     @Test
@@ -168,9 +175,9 @@
     	IClassNode node = (IClassNode) getNode("public class B extends A { public override function set foo(value:int):void {super.foo = value;} }; public class A { public function set foo(value:int):void{} public function get foo():int { return 0;}}",
         		IClassNode.class, WRAP_LEVEL_PACKAGE);
         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/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('B', B);\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);");
+        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 * @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 fabe07f..dd74e14 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
@@ -46,10 +46,11 @@
                 "public function doStuff():void {label = 'hello, bye'; var theLabel:String = label;}; private var _label:String; public function get label():String {return _label}; public function set label(value:String):void {_label = value}; ",
                 IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('RoyaleTest_A', RoyaleTest_A);\n\n\n/**\n * @export\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" +
+        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" +
+                "/**\n * @nocollapse\n * @export\n * @type {string}\n */\nRoyaleTest_A.prototype.label;\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);
     }
@@ -61,10 +62,11 @@
                 "public class B { public function B() {}; public function doStuff():void {this.label = label + 'bye'; var theLabel:String = label;}; private var _label:String; public function get label():String {return _label}; public function set label(value:String):void {_label = value};}",
                 IClassNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('B', B);\n\n\n/**\n * @export\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" +
+        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" +
+                "/**\n * @nocollapse\n * @export\n * @type {string}\n */\nB.prototype.label;\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);
     }
@@ -76,10 +78,11 @@
                 "public function doStuff():void {label = label + 'bye'; var theLabel:String = label;}; private var _label:String; public function get label():String {return _label}; public function set label(value:String):void {_label = value}; ",
                 IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('RoyaleTest_A', RoyaleTest_A);\n\n\n/**\n * @export\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" +
+        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" +
+                "/**\n * @nocollapse\n * @export\n * @type {string}\n */\nRoyaleTest_A.prototype.label;\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);
     }
@@ -91,10 +94,11 @@
                 "public class B { public function B() {}; public function doStuff():void {label = this.label; var theLabel:String = label;}; private var _label:String; public function get label():String {return _label}; public function set label(value:String):void {_label = value};}",
                 IClassNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('B', B);\n\n\n/**\n * @export\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" +
+        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" +
+                "/**\n * @nocollapse\n * @export\n * @type {string}\n */\nB.prototype.label;\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);
     }
@@ -106,10 +110,11 @@
                 "import custom.custom_namespace;use namespace custom_namespace;public class B { public function B() {}; public function doStuff():void {var theLabel:String = label; label = theLabel;}; private var _label:String; custom_namespace function get label():String {return _label}; custom_namespace function set label(value:String):void {_label = value};}",
                 IClassNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('B', B);\n\n\n/**\n * @export\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" +
+        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" +
+                "/**\n * @nocollapse\n * @export\n * @type {string}\n */\nB.prototype.http_$$ns_apache_org$2017$custom$namespace__label;\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);
     }
 
@@ -120,10 +125,11 @@
                 "import custom.custom_namespace;use namespace custom_namespace;public class B { public function B() {}; public function doStuff():void {var theLabel:String = this.label; this.label = theLabel;}; private var _label:String; custom_namespace function get label():String {return _label}; custom_namespace function set label(value:String):void {_label = value};}",
                 IClassNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('B', B);\n\n\n/**\n * @export\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" +
+        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" +
+                "/**\n * @nocollapse\n * @export\n * @type {string}\n */\nB.prototype.http_$$ns_apache_org$2017$custom$namespace__label;\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);
     }
 
@@ -134,10 +140,11 @@
                 "import custom.custom_namespace;use namespace custom_namespace;public class B { public function B() {}; public function doStuff():void {var theLabel:String = label; label = theLabel;}; private static var _label:String; custom_namespace static function get label():String {return _label}; custom_namespace static function set label(value:String):void {_label = value};}",
                 IClassNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('B', B);\n\n\n/**\n * @export\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" +
-				"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);";
+        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" +
+                "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 * @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);
     }
 
@@ -148,10 +155,11 @@
                 "import custom.custom_namespace;use namespace custom_namespace;public class B { public function B() {}; public function doStuff():void {var theLabel:String = B.label; B.label = theLabel;}; private static var _label:String; custom_namespace static function get label():String {return _label}; custom_namespace static function set label(value:String):void {_label = value};}",
                 IClassNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('B', B);\n\n\n/**\n * @export\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" +
-				"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);";
+        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" +        
+                "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 * @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);
     }
 
@@ -162,7 +170,8 @@
                 "public function doStuff():void {label = 'hello, bye'; var theLabel:String = label;}; private var _label:String; [Bindable] public function get label():String {return _label}; public function set label(value:String):void {_label = value}; ",
                 IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-        String expected ="/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('RoyaleTest_A', RoyaleTest_A);\n\n\n/**\n * @export\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" +
+        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" +
+                "/**\n * @nocollapse\n * @export\n * @type {string}\n */\nRoyaleTest_A.prototype.label;\n\n\n" +
                 "RoyaleTest_A.prototype.get__label = function() {\n  return this._label;\n};\n\n\n" +
                 "RoyaleTest_A.prototype.bindable__set__label_RoyaleTest_A = function(value) {\n" +
                 "  this._label = value;" +
@@ -176,7 +185,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" +
@@ -191,10 +201,11 @@
                 "public function doStuff():void {label = 'hello, bye'; var theLabel:String = label;}; private var _label:String; [Bindable(\"change\")] public function get label():String {return _label}; public function set label(value:String):void {_label = value}; ",
                 IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('RoyaleTest_A', RoyaleTest_A);\n\n\n/**\n * @export\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" +
+        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" +
+                "/**\n * @nocollapse\n * @export\n * @type {string}\n */\nRoyaleTest_A.prototype.label;\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 7246eb8..595dbdd 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
@@ -48,7 +48,7 @@
     {
         IClassNode node = getClassNode("public class A {public function A() { super(); }}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\norg.apache.royale.A = function() {\n  ;\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.A', org.apache.royale.A);");
+        assertOut("/**\n * @constructor\n */\norg.apache.royale.A = function() {\n  ;\n};");
     }
 
     @Override
@@ -57,7 +57,7 @@
     {
         IClassNode node = getClassNode("public class A extends TestImplementation {public function A() {}}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n * @extends {custom.TestImplementation}\n */\norg.apache.royale.A = function() {\n  org.apache.royale.A.base(this, 'constructor');\n};\ngoog.inherits(org.apache.royale.A, custom.TestImplementation);\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.A', org.apache.royale.A);");
+        assertOut("/**\n * @constructor\n * @extends {custom.TestImplementation}\n */\norg.apache.royale.A = function() {\n  org.apache.royale.A.base(this, 'constructor');\n};\ngoog.inherits(org.apache.royale.A, custom.TestImplementation);");
     }
 
     @Test
@@ -65,7 +65,7 @@
     {
         IClassNode node = getClassNode("public class A extends TestImplementation {public function A(arg:String) { super(arg);}}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n * @extends {custom.TestImplementation}\n * @param {string} arg\n */\norg.apache.royale.A = function(arg) {\n  org.apache.royale.A.base(this, 'constructor', arg);\n};\ngoog.inherits(org.apache.royale.A, custom.TestImplementation);\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.A', org.apache.royale.A);");
+        assertOut("/**\n * @constructor\n * @extends {custom.TestImplementation}\n * @param {string} arg\n */\norg.apache.royale.A = function(arg) {\n  org.apache.royale.A.base(this, 'constructor', arg);\n};\ngoog.inherits(org.apache.royale.A, custom.TestImplementation);");
     }
 
     @Test
@@ -73,7 +73,7 @@
     {
         IClassNode node = getClassNode("public class A extends TestImplementation {public function A(arg:String) {}}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n * @extends {custom.TestImplementation}\n * @param {string} arg\n */\norg.apache.royale.A = function(arg) {\n  org.apache.royale.A.base(this, 'constructor');\n};\ngoog.inherits(org.apache.royale.A, custom.TestImplementation);\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.A', org.apache.royale.A);");
+        assertOut("/**\n * @constructor\n * @extends {custom.TestImplementation}\n * @param {string} arg\n */\norg.apache.royale.A = function(arg) {\n  org.apache.royale.A.base(this, 'constructor');\n};\ngoog.inherits(org.apache.royale.A, custom.TestImplementation);");
     }
 
     @Override
@@ -82,7 +82,7 @@
     {
         IClassNode node = getClassNode("public class A extends TestImplementation implements TestInterface {public function A() {}}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n * @extends {custom.TestImplementation}\n * @implements {custom.TestInterface}\n */\norg.apache.royale.A = function() {\n  org.apache.royale.A.base(this, 'constructor');\n};\ngoog.inherits(org.apache.royale.A, custom.TestImplementation);\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.A', org.apache.royale.A);");
+        assertOut("/**\n * @constructor\n * @extends {custom.TestImplementation}\n * @implements {custom.TestInterface}\n */\norg.apache.royale.A = function() {\n  org.apache.royale.A.base(this, 'constructor');\n};\ngoog.inherits(org.apache.royale.A, custom.TestImplementation);");
     }
 
     @Override
@@ -91,7 +91,7 @@
     {
         IClassNode node = getClassNode("public class A extends TestImplementation implements TestInterface, TestOtherInterface {public function A() {}}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n * @extends {custom.TestImplementation}\n * @implements {custom.TestInterface}\n * @implements {custom.TestOtherInterface}\n */\norg.apache.royale.A = function() {\n  org.apache.royale.A.base(this, 'constructor');\n};\ngoog.inherits(org.apache.royale.A, custom.TestImplementation);\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.A', org.apache.royale.A);");
+        assertOut("/**\n * @constructor\n * @extends {custom.TestImplementation}\n * @implements {custom.TestInterface}\n * @implements {custom.TestOtherInterface}\n */\norg.apache.royale.A = function() {\n  org.apache.royale.A.base(this, 'constructor');\n};\ngoog.inherits(org.apache.royale.A, custom.TestImplementation);");
     }
 
     @Override
@@ -100,7 +100,7 @@
     {
         IClassNode node = getClassNode("public final class A extends TestImplementation implements TestInterface, TestOtherInterface {public function A() {}}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n * @extends {custom.TestImplementation}\n * @implements {custom.TestInterface}\n * @implements {custom.TestOtherInterface}\n */\norg.apache.royale.A = function() {\n  org.apache.royale.A.base(this, 'constructor');\n};\ngoog.inherits(org.apache.royale.A, custom.TestImplementation);\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.A', org.apache.royale.A);");
+        assertOut("/**\n * @constructor\n * @extends {custom.TestImplementation}\n * @implements {custom.TestInterface}\n * @implements {custom.TestOtherInterface}\n */\norg.apache.royale.A = function() {\n  org.apache.royale.A.base(this, 'constructor');\n};\ngoog.inherits(org.apache.royale.A, custom.TestImplementation);");
     }
 
     @Override
@@ -109,7 +109,7 @@
     {
         IClassNode node = getClassNode("public class A extends custom.TestImplementation implements custom.TestInterface, custom.TestOtherInterface {public function A() {}}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n * @extends {custom.TestImplementation}\n * @implements {custom.TestInterface}\n * @implements {custom.TestOtherInterface}\n */\norg.apache.royale.A = function() {\n  org.apache.royale.A.base(this, 'constructor');\n};\ngoog.inherits(org.apache.royale.A, custom.TestImplementation);\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.A', org.apache.royale.A);");
+        assertOut("/**\n * @constructor\n * @extends {custom.TestImplementation}\n * @implements {custom.TestInterface}\n * @implements {custom.TestOtherInterface}\n */\norg.apache.royale.A = function() {\n  org.apache.royale.A.base(this, 'constructor');\n};\ngoog.inherits(org.apache.royale.A, custom.TestImplementation);");
     }
 
     @Override
@@ -118,7 +118,7 @@
     {
         IClassNode node = getClassNode("public class A extends custom.TestImplementation { public function A() { super('foo', 42);}}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n * @extends {custom.TestImplementation}\n */\norg.apache.royale.A = function() {\n  org.apache.royale.A.base(this, 'constructor', 'foo', 42);\n};\ngoog.inherits(org.apache.royale.A, custom.TestImplementation);\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.A', org.apache.royale.A);");
+        assertOut("/**\n * @constructor\n * @extends {custom.TestImplementation}\n */\norg.apache.royale.A = function() {\n  org.apache.royale.A.base(this, 'constructor', 'foo', 42);\n};\ngoog.inherits(org.apache.royale.A, custom.TestImplementation);");
     }
 
     @Test
@@ -126,7 +126,7 @@
     {
         IClassNode node = getClassNode("public class B {public function B(arg1:String) {this.arg1 = arg1}; public var arg1:String;}");
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n * @param {string} arg1\n */\norg.apache.royale.B = function(arg1) {\n  this.arg1 = arg1;\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.B', org.apache.royale.B);\n\n\n/**\n * @export\n * @type {string}\n */\norg.apache.royale.B.prototype.arg1 = null;";
+        String expected = "/**\n * @constructor\n * @param {string} arg1\n */\norg.apache.royale.B = function(arg1) {\n  this.arg1 = arg1;\n};\n\n\n/**\n * @type {string}\n */\norg.apache.royale.B.prototype.arg1 = null;";
         assertOut(expected);
     }
 
@@ -135,7 +135,7 @@
     {
         IClassNode node = getClassNode("public class B {public function B() {}; public var event:Event = new Event(); public function foo():String {return event.type;};}");
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n\nthis.event = new Event();\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.B', org.apache.royale.B);\n\n\n/**\n * @export\n * @type {Event}\n */\norg.apache.royale.B.prototype.event = null;\n\n\n/**\n * @export\n * @return {string}\n */\norg.apache.royale.B.prototype.foo = function() {\n  return this.event.type;\n};";
+        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n\nthis.event = new Event();\n};\n\n\n/**\n * @type {Event}\n */\norg.apache.royale.B.prototype.event = null;\n\n\n/**\n * @return {string}\n */\norg.apache.royale.B.prototype.foo = function() {\n  return this.event.type;\n};";
         assertOut(expected);
     }
 
@@ -144,7 +144,7 @@
     {
         IClassNode node = getClassNode("public class B {public function B() {}; public function foo():void {};}");
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.B', org.apache.royale.B);\n\n\n/**\n * @export\n */\norg.apache.royale.B.prototype.foo = function() {\n};";
+        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n */\norg.apache.royale.B.prototype.foo = function() {\n};";
         assertOut(expected);
     }
 
@@ -153,7 +153,7 @@
     {
         IClassNode node = getClassNode("public class B {public function B() {}; public function foo():int { var a:int = 123; return a; };}");
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.B', org.apache.royale.B);\n\n\n/**\n * @export\n * @return {number}\n */\norg.apache.royale.B.prototype.foo = function() {\n  var /** @type {number} */ a = 123;\n  return a;\n};";
+        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @return {number}\n */\norg.apache.royale.B.prototype.foo = function() {\n  var /** @type {number} */ a = 123;\n  return a;\n};";
         assertOut(expected);
     }
 
@@ -162,7 +162,7 @@
     {
         IClassNode node = getClassNode("public class B {public function B() {}; public function foo():int { var a:Number = 123.4; return a; };}");
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.B', org.apache.royale.B);\n\n\n/**\n * @export\n * @return {number}\n */\norg.apache.royale.B.prototype.foo = function() {\n  var /** @type {number} */ a = 123.4;\n  return (a) >> 0;\n};";
+        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @return {number}\n */\norg.apache.royale.B.prototype.foo = function() {\n  var /** @type {number} */ a = 123.4;\n  return (a) >> 0;\n};";
         assertOut(expected);
     }
 
@@ -171,7 +171,7 @@
     {
         IClassNode node = getClassNode("public class B {public function B() {}; public function foo():int { return 123.4 };}");
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.B', org.apache.royale.B);\n\n\n/**\n * @export\n * @return {number}\n */\norg.apache.royale.B.prototype.foo = function() {\n  return 123;\n};";
+        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @return {number}\n */\norg.apache.royale.B.prototype.foo = function() {\n  return 123;\n};";
         assertOut(expected);
     }
 
@@ -180,7 +180,7 @@
     {
         IClassNode node = getClassNode("public class B {public function B() {}; public function foo():uint { var a:uint = 123; return a; };}");
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.B', org.apache.royale.B);\n\n\n/**\n * @export\n * @return {number}\n */\norg.apache.royale.B.prototype.foo = function() {\n  var /** @type {number} */ a = 123;\n  return a;\n};";
+        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @return {number}\n */\norg.apache.royale.B.prototype.foo = function() {\n  var /** @type {number} */ a = 123;\n  return a;\n};";
         assertOut(expected);
     }
 
@@ -189,7 +189,7 @@
     {
         IClassNode node = getClassNode("public class B {public function B() {}; public function foo():uint { var a:Number = 123.4; return a; };}");
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.B', org.apache.royale.B);\n\n\n/**\n * @export\n * @return {number}\n */\norg.apache.royale.B.prototype.foo = function() {\n  var /** @type {number} */ a = 123.4;\n  return (a) >>> 0;\n};";
+        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @return {number}\n */\norg.apache.royale.B.prototype.foo = function() {\n  var /** @type {number} */ a = 123.4;\n  return (a) >>> 0;\n};";
         assertOut(expected);
     }
 
@@ -198,7 +198,7 @@
     {
         IClassNode node = getClassNode("public class B {public function B() {}; public function foo():uint { return 123.4 };}");
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.B', org.apache.royale.B);\n\n\n/**\n * @export\n * @return {number}\n */\norg.apache.royale.B.prototype.foo = function() {\n  return 123;\n};";
+        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @return {number}\n */\norg.apache.royale.B.prototype.foo = function() {\n  return 123;\n};";
         assertOut(expected);
     }
 
@@ -207,7 +207,7 @@
     {
         IClassNode node = getClassNode("public class B {public function B() {}; public function foo():Boolean { var a:Boolean = true; return a; };}");
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.B', org.apache.royale.B);\n\n\n/**\n * @export\n * @return {boolean}\n */\norg.apache.royale.B.prototype.foo = function() {\n  var /** @type {boolean} */ a = true;\n  return a;\n};";
+        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @return {boolean}\n */\norg.apache.royale.B.prototype.foo = function() {\n  var /** @type {boolean} */ a = true;\n  return a;\n};";
         assertOut(expected);
     }
 
@@ -216,7 +216,7 @@
     {
         IClassNode node = getClassNode("public class B {public function B() {}; public function foo():Boolean { var a:Number = 123.4; return a; };}");
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.B', org.apache.royale.B);\n\n\n/**\n * @export\n * @return {boolean}\n */\norg.apache.royale.B.prototype.foo = function() {\n  var /** @type {number} */ a = 123.4;\n  return !!(a);\n};";
+        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @return {boolean}\n */\norg.apache.royale.B.prototype.foo = function() {\n  var /** @type {number} */ a = 123.4;\n  return !!(a);\n};";
         assertOut(expected);
     }
 
@@ -225,7 +225,7 @@
     {
         IClassNode node = getClassNode("public class B {public function B() {}; public function foo():Boolean { return 123.4 };}");
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.B', org.apache.royale.B);\n\n\n/**\n * @export\n * @return {boolean}\n */\norg.apache.royale.B.prototype.foo = function() {\n  return true;\n};";
+        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @return {boolean}\n */\norg.apache.royale.B.prototype.foo = function() {\n  return true;\n};";
         assertOut(expected);
     }
 
@@ -234,7 +234,7 @@
     {
         IClassNode node = getClassNode("public class B {public function B() {}; override public function foo():void {};}");
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.B', org.apache.royale.B);\n\n\n/**\n * @export\n * @override\n */\norg.apache.royale.B.prototype.foo = function() {\n};";
+        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @override\n */\norg.apache.royale.B.prototype.foo = function() {\n};";
         assertOut(expected);
     }
 
@@ -243,7 +243,7 @@
     {
         IClassNode node = getClassNode("public class B {public function B() {}; override public function foo(value:Object):void {baz = ''};}");
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.B', org.apache.royale.B);\n\n\n/**\n * @export\n * @override\n */\norg.apache.royale.B.prototype.foo = function(value) {\n  baz = '';\n};";
+        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @override\n */\norg.apache.royale.B.prototype.foo = function(value) {\n  baz = '';\n};";
         assertOut(expected);
     }
 
@@ -252,7 +252,7 @@
     {
         IClassNode node = getClassNode("public class B {public function B() {}; override public function foo():void {super.foo();};}");
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.B', org.apache.royale.B);\n\n\n/**\n * @export\n * @override\n */\norg.apache.royale.B.prototype.foo = function() {\n  org.apache.royale.B.superClass_.foo.apply(this);\n};";
+        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @override\n */\norg.apache.royale.B.prototype.foo = function() {\n  org.apache.royale.B.superClass_.foo.apply(this);\n};";
         assertOut(expected);
     }
 
@@ -261,7 +261,12 @@
     {
         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\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.B', org.apache.royale.B);\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\n" +
+                "/**\n * @nocollapse\n * @export\n * @type {Object}\n */\norg.apache.royale.B.prototype.baz;\n\n\n" +
+                "org.apache.royale.B.prototype.set__baz = function(value) {\n};\n\n\n" +
+                "/**\n * @nocollapse\n * @export\n * @type {Object}\n */\norg.apache.royale.B.prototype.foo;\n\n\n" +
+                "org.apache.royale.B.prototype.set__foo = function(value) {\n  this.baz = value;\n};\n\n\n" +
+                "Object.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 +275,9 @@
     {
         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\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.B', org.apache.royale.B);\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\n" +
+                "org.apache.royale.B.prototype.set__foo = function(value) {\n  org.apache.royale.B.superClass_.set__foo.apply(this, [ value] );\n};\n\n\n" +
+                "Object.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);
     }
 
@@ -279,7 +286,7 @@
     {
         IClassNode node = getClassNode("import custom.custom_namespace; use namespace custom_namespace; public class B {public function B() {}; custom_namespace function foo():void {};}");
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.B', org.apache.royale.B);\n\n\n/**\n * @export\n */\norg.apache.royale.B.prototype.http_$$ns_apache_org$2017$custom$namespace__foo = function() {\n};";
+        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n */\norg.apache.royale.B.prototype.http_$$ns_apache_org$2017$custom$namespace__foo = function() {\n};";
         assertOut(expected);
     }
 
@@ -289,7 +296,7 @@
     	FileNode node = (FileNode)getNode("package org.apache.royale {\npublic class B {public function B() {}; }} class A {public function get a():A {return null}}", FileNode.class, 0);
         asBlockWalker.visitFile(node);
         String expected = "/**\n * org.apache.royale.B\n *\n * @fileoverview\n *\n * @suppress {checkTypes|accessControls}\n */\n\ngoog.provide('org.apache.royale.B');\ngoog.provide('org.apache.royale.B.A');\n\n\n\n" +
-                          "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.B', org.apache.royale.B);" +
+                          "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};" +
                           "\n\n\n/**\n" + 
                           " * Metadata\n" + 
                           " *\n" + 
@@ -328,12 +335,14 @@
                           "};\n" + 
                           "\n" + 
                           "\n" + 
-                          "/**\n" + 
-                          " * Prevent renaming of class. Needed for reflection.\n" + 
-                          " */\n" + 
-                          "goog.exportSymbol('org.apache.royale.B.A', org.apache.royale.B.A);\n" + 
-                          "\n" + 
-                          "\n" + 
+                          "/**\n" +
+                          " * @nocollapse\n" +
+                          " * @export\n" +
+                          " * @type {A}\n" +
+                          " */\n" +
+                          "org.apache.royale.B.A.prototype.a;\n" +
+                          "\n" +
+                          "\n" +
                           "org.apache.royale.B.A.prototype.get__a = function() {\n" + 
                           "  return null;\n" + 
                           "};\n" + 
@@ -341,8 +350,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" + 
@@ -386,7 +394,7 @@
     {
         IClassNode node = getClassNode("public class A extends custom.TestImplementation {public function A(arg1:String, arg2:int) {}}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n * @extends {custom.TestImplementation}\n * @param {string} arg1\n * @param {number} arg2\n */\norg.apache.royale.A = function(arg1, arg2) {\n  org.apache.royale.A.base(this, 'constructor');\n};\ngoog.inherits(org.apache.royale.A, custom.TestImplementation);\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.A', org.apache.royale.A);");
+        assertOut("/**\n * @constructor\n * @extends {custom.TestImplementation}\n * @param {string} arg1\n * @param {number} arg2\n */\norg.apache.royale.A = function(arg1, arg2) {\n  org.apache.royale.A.base(this, 'constructor');\n};\ngoog.inherits(org.apache.royale.A, custom.TestImplementation);");
     }
 
     @Override
@@ -396,7 +404,7 @@
         IClassNode node = getClassNode("public class A {public var a:Object;protected var b:String; "
                 + "private var c:int; internal var d:uint; var e:Number}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\norg.apache.royale.A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.A', org.apache.royale.A);\n\n\n/**\n * @export\n * @type {Object}\n */\norg.apache.royale.A.prototype.a = null;\n\n\n/**\n * @protected\n * @type {string}\n */\norg.apache.royale.A.prototype.b = null;\n\n\n/**\n * @private\n * @type {number}\n */\norg.apache.royale.A.prototype.c = 0;\n\n\n/**\n * @type {number}\n */\norg.apache.royale.A.prototype.d = 0;\n\n\n/**\n * @type {number}\n */\norg.apache.royale.A.prototype.e = NaN;");
+        assertOut("/**\n * @constructor\n */\norg.apache.royale.A = function() {\n};\n\n\n/**\n * @type {Object}\n */\norg.apache.royale.A.prototype.a = null;\n\n\n/**\n * @protected\n * @type {string}\n */\norg.apache.royale.A.prototype.b = null;\n\n\n/**\n * @private\n * @type {number}\n */\norg.apache.royale.A.prototype.c = 0;\n\n\n/**\n * @package\n * @type {number}\n */\norg.apache.royale.A.prototype.d = 0;\n\n\n/**\n * @package\n * @type {number}\n */\norg.apache.royale.A.prototype.e = NaN;");
     }
 
     @Test
@@ -407,9 +415,8 @@
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n" +
         		  " */\norg.apache.royale.A = function() {\n" +
-        		  "};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.A', org.apache.royale.A);\n\n\n" +
+        		  "};\n\n\n" +
         		  "/**\n" +
-        		  " * @export\n" +
         		  " * @type {Object}\n" +
         		  " */\n" +
         		  "org.apache.royale.A.prototype.a_ = null;\n\n\n" +
@@ -423,16 +430,19 @@
         		  " * @type {number}\n" +
         		  " */\n" +
         		  "org.apache.royale.A.prototype.c_ = 0;\n\n\n" +
-        		  "/**\n" +
+                  "/**\n" +
+                  " * @package\n" + 
         		  " * @type {number}\n" +
         		  " */\n" +
         		  "org.apache.royale.A.prototype.d = 0;\n\n\n" +
-        		  "/**\n" +
+                  "/**\n" +
+                  " * @package\n" +
         		  " * @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" +
@@ -448,9 +458,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" +
@@ -465,9 +476,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" +
@@ -495,9 +507,8 @@
         assertOut("/**\n * @constructor\n" +
         		  " */\norg.apache.royale.A = function() {\n\n" +
         		  "this.a_ = {foo:1};\n" +
-        		  "};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.A', org.apache.royale.A);\n\n\n" +
+        		  "};\n\n\n" +
         		  "/**\n" +
-        		  " * @export\n" +
         		  " * @type {Object}\n" +
         		  " */\n" +
         		  "org.apache.royale.A.prototype.a_ = null;\n\n\n" +
@@ -511,16 +522,19 @@
         		  " * @type {number}\n" +
         		  " */\n" +
         		  "org.apache.royale.A.prototype.c_ = 0;\n\n\n" +
-        		  "/**\n" +
+                  "/**\n" +
+                  " * @package\n" + 
         		  " * @type {number}\n" +
         		  " */\n" +
         		  "org.apache.royale.A.prototype.d = 0;\n\n\n" +
         		  "/**\n" +
+                  " * @package\n" + 
         		  " * @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" +
@@ -536,9 +550,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" +
@@ -553,9 +568,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" +
@@ -582,9 +598,8 @@
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n" +
         		  " */\norg.apache.royale.A = function() {\n" +
-        		  "};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.A', org.apache.royale.A);\n\n\n" +
+        		  "};\n\n\n" +
         		  "/**\n" +
-        		  " * @export\n" +
         		  " * @type {Object}\n" +
         		  " */\n" +
         		  "org.apache.royale.A.prototype.a_ = null;\n\n\n" +
@@ -599,15 +614,18 @@
         		  " */\n" +
         		  "org.apache.royale.A.prototype.c = 0;\n\n\n" +
         		  "/**\n" +
+                  " * @package\n" + 
         		  " * @type {number}\n" +
         		  " */\n" +
         		  "org.apache.royale.A.prototype.d = 0;\n\n\n" +
         		  "/**\n" +
+                  " * @package\n" + 
         		  " * @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" +
@@ -632,7 +650,7 @@
         IClassNode node = getClassNode("public class A {public static var a:int = 10;public static var b:String = initStatic(); "
                 + "private static function initStatic():String { return \"foo\"; }}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\norg.apache.royale.A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.A', org.apache.royale.A);\n\n\n/**\n * @export\n * @nocollapse\n * @type {number}\n */\norg.apache.royale.A.a = 10;\n\n\n/**\n * @export\n * @nocollapse\n * @type {string}\n */\norg.apache.royale.A.b;\n\n\n/**\n * @private\n * @return {string}\n */\norg.apache.royale.A.initStatic = function() {\n  return \"foo\";\n};\n\norg.apache.royale.A.b = org.apache.royale.A.initStatic();\n\n");
+        assertOut("/**\n * @constructor\n */\norg.apache.royale.A = function() {\n};\n\n\n/**\n * @nocollapse\n * @type {number}\n */\norg.apache.royale.A.a = 10;\n\n\n/**\n * @nocollapse\n * @type {string}\n */\norg.apache.royale.A.b;\n\n\n/**\n * @private\n * @return {string}\n */\norg.apache.royale.A.initStatic = function() {\n  return \"foo\";\n};\n\norg.apache.royale.A.b = org.apache.royale.A.initStatic();\n\n");
     }
     
     @Test
@@ -640,7 +658,7 @@
     {
         FileNode node = (FileNode)getNode("package org.apache.royale {\npublic class A {\nimport flash.display.Sprite; Sprite;\n}}", FileNode.class, 0);
         asBlockWalker.visitFile(node);
-        assertOut("/**\n * org.apache.royale.A\n *\n * @fileoverview\n *\n * @suppress {checkTypes|accessControls}\n */\n\ngoog.provide('org.apache.royale.A');\n\n\n\n/**\n * @constructor\n */\norg.apache.royale.A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.A', org.apache.royale.A);");
+        assertOut("/**\n * org.apache.royale.A\n *\n * @fileoverview\n *\n * @suppress {checkTypes|accessControls}\n */\n\ngoog.provide('org.apache.royale.A');\n\n\n\n/**\n * @constructor\n */\norg.apache.royale.A = function() {\n};");
     }
     
     @Override
@@ -653,7 +671,7 @@
                 + "private static const C:Number = 42;"
                 + "custom_namespace static const C:String = 'me' + 'you';}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\norg.apache.royale.A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.A', org.apache.royale.A);\n\n\n/**\n * @export\n * @nocollapse\n * @const\n * @type {number}\n */\norg.apache.royale.A.A = 42;\n\n\n/**\n * @protected\n * @nocollapse\n * @const\n * @type {number}\n */\norg.apache.royale.A.B = 42;\n\n\n/**\n * @private\n * @const\n * @type {number}\n */\norg.apache.royale.A.C = 42;\n\n\n/**\n * @const\n * @type {string}\n */\norg.apache.royale.A.http_$$ns_apache_org$2017$custom$namespace__C = 'me' + 'you';");
+        assertOut("/**\n * @constructor\n */\norg.apache.royale.A = function() {\n};\n\n\n/**\n * @nocollapse\n * @const\n * @type {number}\n */\norg.apache.royale.A.A = 42;\n\n\n/**\n * @protected\n * @nocollapse\n * @const\n * @type {number}\n */\norg.apache.royale.A.B = 42;\n\n\n/**\n * @private\n * @const\n * @type {number}\n */\norg.apache.royale.A.C = 42;\n\n\n/**\n * @const\n * @type {string}\n */\norg.apache.royale.A.http_$$ns_apache_org$2017$custom$namespace__C = 'me' + 'you';");
     }
 
     @Override
@@ -672,22 +690,27 @@
                 + "custom_namespace function get foo6():Object{return null;}"
                 + "custom_namespace function set foo6(value:Object):void{}" + "}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\norg.apache.royale.A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.A', org.apache.royale.A);\n\n\n" +
+        assertOut("/**\n * @constructor\n */\norg.apache.royale.A = function() {\n};\n\n\n" +
+                "/**\n * @nocollapse\n * @export\n * @type {Object}\n */\norg.apache.royale.A.prototype.foo1;\n\n\n" +
         		"org.apache.royale.A.prototype.get__foo1 = function() {\n  return null;\n};\n\n\n" +
-        		"org.apache.royale.A.prototype.set__foo1 = function(value) {\n};\n\n\n" +
+                "org.apache.royale.A.prototype.set__foo1 = function(value) {\n};\n\n\n" +
+                "/**\n * @nocollapse\n * @type {Object}\n */\norg.apache.royale.A.prototype.foo2;\n\n\n" +
         		"org.apache.royale.A.prototype.get__foo2 = function() {\n  return null;\n};\n\n\n" +
         		"org.apache.royale.A.prototype.set__foo2 = function(value) {\n};\n\n\n" +
+                "/**\n * @type {Object}\n */\norg.apache.royale.A.prototype.foo3;\n\n\n" +
         		"org.apache.royale.A.prototype.get__foo3 = function() {\n  return null;\n};\n\n\n" +
         		"org.apache.royale.A.prototype.set__foo3 = function(value) {\n};\n\n\n" +
+                "/**\n * @nocollapse\n * @type {Object}\n */\norg.apache.royale.A.prototype.foo5;\n\n\n" +
         		"org.apache.royale.A.prototype.get__foo5 = function() {\n  return null;\n};\n\n\n" +
-        		"org.apache.royale.A.prototype.set__foo5 = function(value) {\n};\n\n\n" +
+                "org.apache.royale.A.prototype.set__foo5 = function(value) {\n};\n\n\n" +
+                "/**\n * @nocollapse\n * @export\n * @type {Object}\n */\norg.apache.royale.A.prototype.http_$$ns_apache_org$2017$custom$namespace__foo6;\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);");
     }
@@ -707,7 +730,7 @@
                 + "public static function foo7(value:Object):void{}"
                 + "custom_namespace static function foo7(value:Object):void{}" + "}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\norg.apache.royale.A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.A', org.apache.royale.A);\n\n\n/**\n * @export\n * @return {Object}\n */\norg.apache.royale.A.prototype.foo1 = function() {\n  return null;\n};\n\n\n/**\n * @export\n * @return {Object}\n */\norg.apache.royale.A.prototype.foo1a = function() {\n  return null;\n};\n\n\n/**\n * @export\n * @override\n */\norg.apache.royale.A.prototype.foo1b = function() {\n  return org.apache.royale.A.superClass_.foo1b.apply(this);\n};\n\n\n/**\n * @protected\n * @param {Object} value\n */\norg.apache.royale.A.prototype.foo2 = function(value) {\n};\n\n\n/**\n * @private\n * @param {Object} value\n */\norg.apache.royale.A.prototype.foo3 = function(value) {\n};\n\n\n/**\n * @export\n * @param {Object} value\n */\norg.apache.royale.A.prototype.foo5 = function(value) {\n};\n\n\n/**\n * @export\n * @param {Object} value\n */\norg.apache.royale.A.prototype.http_$$ns_apache_org$2017$custom$namespace__foo6 = function(value) {\n};\n\n\n/**\n * @export\n * @param {Object} value\n */\norg.apache.royale.A.foo7 = function(value) {\n};\n\n\n/**\n * @export\n * @param {Object} value\n */\norg.apache.royale.A.http_$$ns_apache_org$2017$custom$namespace__foo7 = function(value) {\n};");
+        assertOut("/**\n * @constructor\n */\norg.apache.royale.A = function() {\n};\n\n\n/**\n * @return {Object}\n */\norg.apache.royale.A.prototype.foo1 = function() {\n  return null;\n};\n\n\n/**\n * @return {Object}\n */\norg.apache.royale.A.prototype.foo1a = function() {\n  return null;\n};\n\n\n/**\n * @override\n */\norg.apache.royale.A.prototype.foo1b = function() {\n  return org.apache.royale.A.superClass_.foo1b.apply(this);\n};\n\n\n/**\n * @protected\n * @param {Object} value\n */\norg.apache.royale.A.prototype.foo2 = function(value) {\n};\n\n\n/**\n * @private\n * @param {Object} value\n */\norg.apache.royale.A.prototype.foo3 = function(value) {\n};\n\n\n/**\n * @package\n * @param {Object} value\n */\norg.apache.royale.A.prototype.foo5 = function(value) {\n};\n\n\n/**\n * @param {Object} value\n */\norg.apache.royale.A.prototype.http_$$ns_apache_org$2017$custom$namespace__foo6 = function(value) {\n};\n\n\n/**\n * @nocollapse\n * @param {Object} value\n */\norg.apache.royale.A.foo7 = function(value) {\n};\n\n\n/**\n * @nocollapse\n * @param {Object} value\n */\norg.apache.royale.A.http_$$ns_apache_org$2017$custom$namespace__foo7 = function(value) {\n};");
     }
 
     @Test
@@ -718,7 +741,7 @@
                 + "public function foo2():Object{function bar2(param1:Object):Object {return null;}; return bar2('foo');}"
                 + "}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.B', org.apache.royale.B);\n\n\n/**\n * @export\n * @return {Object}\n */\norg.apache.royale.B.prototype.foo1 = function() {\n  var self = this;\n  function bar1() {\n    return null;\n  };\n  return bar1();\n};\n\n\n/**\n * @export\n * @return {Object}\n */\norg.apache.royale.B.prototype.foo2 = function() {\n  var self = this;\n  function bar2(param1) {\n    return null;\n  };\n  return bar2('foo');\n};");
+        assertOut("/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @return {Object}\n */\norg.apache.royale.B.prototype.foo1 = function() {\n  var self = this;\n  function bar1() {\n    return null;\n  };\n  return bar1();\n};\n\n\n/**\n * @return {Object}\n */\norg.apache.royale.B.prototype.foo2 = function() {\n  var self = this;\n  function bar2(param1) {\n    return null;\n  };\n  return bar2('foo');\n};");
     }
 
     @Test
@@ -730,7 +753,7 @@
                 + "public function foo2():String{function bar2(param1:String):String {return param1 + baz1;}; return bar2('foo');}"
                 + "}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.B', org.apache.royale.B);\n\n\n/**\n * @export\n * @type {string}\n */\norg.apache.royale.B.prototype.baz1 = null;\n\n\n/**\n * @export\n * @return {string}\n */\norg.apache.royale.B.prototype.foo1 = function() {\n  var self = this;\n  function bar1() {\n    return self.baz1;\n  };\n  return bar1();\n};\n\n\n/**\n * @export\n * @return {string}\n */\norg.apache.royale.B.prototype.foo2 = function() {\n  var self = this;\n  function bar2(param1) {\n    return param1 + self.baz1;\n  };\n  return bar2('foo');\n};");
+        assertOut("/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @type {string}\n */\norg.apache.royale.B.prototype.baz1 = null;\n\n\n/**\n * @return {string}\n */\norg.apache.royale.B.prototype.foo1 = function() {\n  var self = this;\n  function bar1() {\n    return self.baz1;\n  };\n  return bar1();\n};\n\n\n/**\n * @return {string}\n */\norg.apache.royale.B.prototype.foo2 = function() {\n  var self = this;\n  function bar2(param1) {\n    return param1 + self.baz1;\n  };\n  return bar2('foo');\n};");
     }
 
     @Test
@@ -750,7 +773,7 @@
                 + "public function clone():B { return new B() }"
                 + "}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.B', org.apache.royale.B);\n\n\n/**\n * @export\n * @return {org.apache.royale.B}\n */\norg.apache.royale.B.prototype.clone = function() {\n  return new org.apache.royale.B();\n};");
+        assertOut("/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @return {org.apache.royale.B}\n */\norg.apache.royale.B.prototype.clone = function() {\n  return new org.apache.royale.B();\n};");
     }
 
     @Override
@@ -759,7 +782,7 @@
     {
         IClassNode node = getClassNode("public class A{}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\norg.apache.royale.A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.A', org.apache.royale.A);");
+        assertOut("/**\n * @constructor\n */\norg.apache.royale.A = function() {\n};");
     }
 
     @Override
@@ -770,7 +793,7 @@
         //               in JS we ignore it
         IClassNode node = getClassNode("internal class A{}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\norg.apache.royale.A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.A', org.apache.royale.A);");
+        assertOut("/**\n * @constructor\n */\norg.apache.royale.A = function() {\n};");
     }
 
     @Override
@@ -781,7 +804,7 @@
         //               in JS we ignore it
         IClassNode node = getClassNode("public final class A{}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\norg.apache.royale.A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.A', org.apache.royale.A);");
+        assertOut("/**\n * @constructor\n */\norg.apache.royale.A = function() {\n};");
     }
 
     @Override
@@ -791,7 +814,7 @@
         // (erikdebruin) all JS objects are 'dynamic' by design
         IClassNode node = getClassNode("public dynamic class A{}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\norg.apache.royale.A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.A', org.apache.royale.A);");
+        assertOut("/**\n * @constructor\n */\norg.apache.royale.A = function() {\n};");
     }
 
     @Override
@@ -800,7 +823,7 @@
     {
         IClassNode node = getClassNode("public class A implements TestInterface {public function A() {}}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n * @implements {custom.TestInterface}\n */\norg.apache.royale.A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.A', org.apache.royale.A);");
+        assertOut("/**\n * @constructor\n * @implements {custom.TestInterface}\n */\norg.apache.royale.A = function() {\n};");
     }
 
     @Override
@@ -809,7 +832,7 @@
     {
         IClassNode node = getClassNode("public class A implements TestInterface, TestOtherInterface {public function A() {}}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n * @implements {custom.TestInterface}\n * @implements {custom.TestOtherInterface}\n */\norg.apache.royale.A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.A', org.apache.royale.A);");
+        assertOut("/**\n * @constructor\n * @implements {custom.TestInterface}\n * @implements {custom.TestOtherInterface}\n */\norg.apache.royale.A = function() {\n};");
     }
 
 
@@ -819,7 +842,7 @@
     {
         IClassNode node = getClassNode("public class A {public function A() { }}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\norg.apache.royale.A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.A', org.apache.royale.A);");
+        assertOut("/**\n * @constructor\n */\norg.apache.royale.A = function() {\n};");
     }
 
 
@@ -829,7 +852,7 @@
     {
         IClassNode node = getClassNode("public class A {public function A(arg1:String, arg2:int) {}}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n * @param {string} arg1\n * @param {number} arg2\n */\norg.apache.royale.A = function(arg1, arg2) {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.A', org.apache.royale.A);");
+        assertOut("/**\n * @constructor\n * @param {string} arg1\n * @param {number} arg2\n */\norg.apache.royale.A = function(arg1, arg2) {\n};");
     }
 
     @Test
@@ -837,7 +860,7 @@
     {
         IClassNode node = getClassNode("public class A {public function A(arg1:String, arg2:int) {arg2 = arg2 + 2;} public var foo:Array = [];}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n * @param {string} arg1\n * @param {number} arg2\n */\norg.apache.royale.A = function(arg1, arg2) {\n  \n  this.foo = [];\n  arg2 = (arg2 + 2) >> 0;\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.A', org.apache.royale.A);\n\n\n/**\n * @export\n * @type {Array}\n */\norg.apache.royale.A.prototype.foo = null;");
+        assertOut("/**\n * @constructor\n * @param {string} arg1\n * @param {number} arg2\n */\norg.apache.royale.A = function(arg1, arg2) {\n  \n  this.foo = [];\n  arg2 = (arg2 + 2) >> 0;\n};\n\n\n/**\n * @type {Array}\n */\norg.apache.royale.A.prototype.foo = null;");
     }
 
     @Test
@@ -845,7 +868,7 @@
     {
         IClassNode node = getClassNode("import custom.custom_namespace; use namespace custom_namespace; public class A {public function A(arg1:String, arg2:int) {arg2 = arg2 + 2;} custom_namespace var foo:Array = [];}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n * @param {string} arg1\n * @param {number} arg2\n */\norg.apache.royale.A = function(arg1, arg2) {\n  \n  this.http_$$ns_apache_org$2017$custom$namespace__foo = [];\n  arg2 = (arg2 + 2) >> 0;\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.A', org.apache.royale.A);\n\n\n/**\n * @type {Array}\n */\norg.apache.royale.A.prototype.http_$$ns_apache_org$2017$custom$namespace__foo = null;");
+        assertOut("/**\n * @constructor\n * @param {string} arg1\n * @param {number} arg2\n */\norg.apache.royale.A = function(arg1, arg2) {\n  \n  this.http_$$ns_apache_org$2017$custom$namespace__foo = [];\n  arg2 = (arg2 + 2) >> 0;\n};\n\n\n/**\n * @type {Array}\n */\norg.apache.royale.A.prototype.http_$$ns_apache_org$2017$custom$namespace__foo = null;");
     }
 
     @Test
@@ -853,7 +876,7 @@
     {
         IClassNode node = getClassNode("public class A extends TestImplementation {public function A(arg1:String, arg2:int) {arg2 = arg2 + 2;} public var foo:Array = [];}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n * @extends {custom.TestImplementation}\n * @param {string} arg1\n * @param {number} arg2\n */\norg.apache.royale.A = function(arg1, arg2) {\n  org.apache.royale.A.base(this, 'constructor');\n  \n  this.foo = [];\n  arg2 = (arg2 + 2) >> 0;\n};\ngoog.inherits(org.apache.royale.A, custom.TestImplementation);\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.A', org.apache.royale.A);\n\n\n/**\n * @export\n * @type {Array}\n */\norg.apache.royale.A.prototype.foo = null;");
+        assertOut("/**\n * @constructor\n * @extends {custom.TestImplementation}\n * @param {string} arg1\n * @param {number} arg2\n */\norg.apache.royale.A = function(arg1, arg2) {\n  org.apache.royale.A.base(this, 'constructor');\n  \n  this.foo = [];\n  arg2 = (arg2 + 2) >> 0;\n};\ngoog.inherits(org.apache.royale.A, custom.TestImplementation);\n\n\n/**\n * @type {Array}\n */\norg.apache.royale.A.prototype.foo = null;");
     }
 
     @Test
@@ -861,7 +884,7 @@
     {
         IClassNode node = getClassNode("public class A {public static const NAME:String = 'Dummy'; public function A(arg1:String = NAME) {_name = arg1;} private var _name:String;}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n * @param {string=} arg1\n */\norg.apache.royale.A = function(arg1) {\n  arg1 = typeof arg1 !== 'undefined' ? arg1 : org.apache.royale.A.NAME;\n  this._name = arg1;\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.royale.A', org.apache.royale.A);\n\n\n/**\n * @export\n * @nocollapse\n * @const\n * @type {string}\n */\norg.apache.royale.A.NAME = 'Dummy';\n\n\n/**\n * @private\n * @type {string}\n */\norg.apache.royale.A.prototype._name = null;");
+        assertOut("/**\n * @constructor\n * @param {string=} arg1\n */\norg.apache.royale.A = function(arg1) {\n  arg1 = typeof arg1 !== 'undefined' ? arg1 : org.apache.royale.A.NAME;\n  this._name = arg1;\n};\n\n\n/**\n * @nocollapse\n * @const\n * @type {string}\n */\norg.apache.royale.A.NAME = 'Dummy';\n\n\n/**\n * @private\n * @type {string}\n */\norg.apache.royale.A.prototype._name = null;");
     }
     
     protected IBackend createBackend()
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleEmitter.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleEmitter.java
index af42aec..a45f7d0 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleEmitter.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleEmitter.java
@@ -59,60 +59,52 @@
         IFileNode node = compileAS(code);
         asBlockWalker.visitFile(node);
 	        assertOutWithMetadata("/**\n" +
-					" * com.example.components.MyEventTarget\n" +
-					" *\n" +
-					" * @fileoverview\n" +
-					" *\n" +
-					" * @suppress {checkTypes|accessControls}\n" +
-					" */\n" +
-					"\n" +
-					"goog.provide('com.example.components.MyEventTarget');\n" +
-					"\n" +
-					"goog.require('custom.TestImplementation');\n" +
-					"\n" +
-					"\n" +
-					"\n" +
-					"/**\n" +
-					" * @constructor\n" +
-					" * @extends {custom.TestImplementation}\n" +
-					" */\n" +
-					"com.example.components.MyEventTarget = function() {\n" +
-					"  com.example.components.MyEventTarget.base(this, 'constructor');\n" +
-					"  if (foo() != 42) {\n" +
-					"    bar();\n" +
-					"  }\n" +
-					"};\n" +
-					"goog.inherits(com.example.components.MyEventTarget, custom.TestImplementation);\n" +
-					"\n" +
-					"\n" +
-					"/**\n" +
-					" * Prevent renaming of class. Needed for reflection.\n" +
-					" */\n" +
-					"goog.exportSymbol('com.example.components.MyEventTarget', com.example.components.MyEventTarget);\n" +
-					"\n" +
-					"\n" +
-					"/**\n" +
-					" * @private\n" +
-					" * @type {string}\n" +
-					" */\n" +
-					"com.example.components.MyEventTarget.prototype._privateVar = \"do \";\n" +
-			"\n" +
-			"\n" +
-			"/**\n" +
-			" * @export\n" +
-			" * @type {number}\n" +
-			" */\n" +
-			"com.example.components.MyEventTarget.prototype.publicProperty = 100;\n" +
-			"\n" +
-			"\n" +
-			"/**\n" +
-			" * @export\n" +
-			" * @param {string} value\n" +
-			" * @return {string}\n" +
-			" */\n" +
-			"com.example.components.MyEventTarget.prototype.myFunction = function(value) {\n" +
-			"  return \"Don't \" + this._privateVar + value;\n" +
-		"};\n" +
+				" * com.example.components.MyEventTarget\n" +
+				" *\n" +
+				" * @fileoverview\n" +
+				" *\n" +
+				" * @suppress {checkTypes|accessControls}\n" +
+				" */\n" +
+				"\n" +
+				"goog.provide('com.example.components.MyEventTarget');\n" +
+				"\n" +
+				"goog.require('custom.TestImplementation');\n" +
+				"\n" +
+				"\n" +
+				"\n" +
+				"/**\n" +
+				" * @constructor\n" +
+				" * @extends {custom.TestImplementation}\n" +
+				" */\n" +
+				"com.example.components.MyEventTarget = function() {\n" +
+				"  com.example.components.MyEventTarget.base(this, 'constructor');\n" +
+				"  if (foo() != 42) {\n" +
+				"    bar();\n" +
+				"  }\n" +
+				"};\n" +
+				"goog.inherits(com.example.components.MyEventTarget, custom.TestImplementation);\n" +
+				"\n" +
+				"\n" +
+				"/**\n" +
+				" * @private\n" +
+				" * @type {string}\n" +
+				" */\n" +
+				"com.example.components.MyEventTarget.prototype._privateVar = \"do \";\n" +
+				"\n" +
+				"\n" +
+				"/**\n" +
+				" * @type {number}\n" +
+				" */\n" +
+				"com.example.components.MyEventTarget.prototype.publicProperty = 100;\n" +
+				"\n" +
+				"\n" +
+				"/**\n" +
+				" * @param {string} value\n" +
+				" * @return {string}\n" +
+				" */\n" +
+				"com.example.components.MyEventTarget.prototype.myFunction = function(value) {\n" +
+				"  return \"Don't \" + this._privateVar + value;\n" +
+				"};\n" +
 				"\n" +
 				"\n" +
 				"/**\n" +
@@ -178,12 +170,6 @@
 				"\n" +
 				"\n" +
 				"/**\n" +
-				" * Prevent renaming of class. Needed for reflection.\n" +
-				" */\n" +
-				"goog.exportSymbol('com.example.components.TestInterface', com.example.components.TestInterface);\n" +
-				"\n" +
-				"\n" +
-				"/**\n" +
 				" * Metadata\n" +
 				" *\n" +
 				" * @type {Object.<string, Array.<Object>>}\n" +
@@ -235,12 +221,6 @@
 				"\n" +
 				"\n" +
 				"/**\n" +
-				" * Prevent renaming of class. Needed for reflection.\n" +
-				" */\n" +
-				"goog.exportSymbol('com.example.components.TestClass', com.example.components.TestClass);\n" +
-				"\n" +
-				"\n" +
-				"/**\n" +
 				" * Metadata\n" +
 				" *\n" +
 				" * @type {Object.<string, Array.<Object>>}\n" +
@@ -265,14 +245,14 @@
     }
     
     @Test
-    public void testInjectHTML()
+    public void testInjectScript()
     {
         String code = "package com.example.components {\n"
         		+ "public class TestClass {"
         	    + "/**\n"
-        	    + " * <inject_html>\n"
+        	    + " * <inject_script>\n"
         		+ " * This will be injected.\n"
-        		+ " * </inject_html>\n"
+        		+ " * </inject_script>\n"
         		+ " */\n"
                 + "public function TestClass() { } } }";
         IFileNode node = compileAS(code);
@@ -290,9 +270,9 @@
 				"\n" +
 				"\n" +
 				"/**\n" +
-				" * <inject_html>\n" +
+				" * <inject_script>\n" +
 				" * This will be injected.\n" +
-				" * </inject_html>\n" +
+				" * </inject_script>\n" +
 				" * @constructor\n" +
 				" */\n" +
 				"com.example.components.TestClass = function() {\n" +
@@ -300,12 +280,6 @@
 				"\n" +
 				"\n" +
 				"/**\n" +
-				" * Prevent renaming of class. Needed for reflection.\n" +
-				" */\n" +
-				"goog.exportSymbol('com.example.components.TestClass', com.example.components.TestClass);\n" +
-				"\n" +
-				"\n" +
-				"/**\n" +
 				" * Metadata\n" +
 				" *\n" +
 				" * @type {Object.<string, Array.<Object>>}\n" +
@@ -342,7 +316,7 @@
     {
         IFunctionNode node = getMethodWithPackage("function method1(p1:Number, p2:Number, p3:Number = 3, p4:Number = 4):Number{return p1 + p2 + p3 + p4;}");
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n * @param {number} p1\n * @param {number} p2\n * @param {number=} p3\n * @param {number=} p4\n * @return {number}\n */\n"
+        assertOut("/**\n * @param {number} p1\n * @param {number} p2\n * @param {number=} p3\n * @param {number=} p4\n * @return {number}\n */\n"
                 + "foo.bar.RoyaleTest_A.prototype.method1 = function(p1, p2, p3, p4) {\n"
                 + "  p3 = typeof p3 !== 'undefined' ? p3 : 3;\n"
                 + "  p4 = typeof p4 !== 'undefined' ? p4 : 4;\n"
@@ -355,7 +329,7 @@
     {
         IFunctionNode node = getMethodWithPackage("function method1(bar:int = 42, bax:int = 4):void{if (a) foo();}");
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n * @param {number=} bar\n * @param {number=} bax\n */\n"
+        assertOut("/**\n * @param {number=} bar\n * @param {number=} bax\n */\n"
                 + "foo.bar.RoyaleTest_A.prototype.method1 = function(bar, bax) {\n"
                 + "  bar = typeof bar !== 'undefined' ? bar : 42;\n"
                 + "  bax = typeof bax !== 'undefined' ? bax : 4;\n"
@@ -368,7 +342,7 @@
     {
         IFunctionNode node = getMethodWithPackage("function method1(p1:int, p2:int, p3:int = 3, p4:int = 4):int{}");
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n * @param {number} p1\n * @param {number} p2\n * @param {number=} p3\n * @param {number=} p4\n * @return {number}\n */\n"
+        assertOut("/**\n * @param {number} p1\n * @param {number} p2\n * @param {number=} p3\n * @param {number=} p4\n * @return {number}\n */\n"
                 + "foo.bar.RoyaleTest_A.prototype.method1 = function(p1, p2, p3, p4) {\n"
                 + "  p3 = typeof p3 !== 'undefined' ? p3 : 3;\n"
                 + "  p4 = typeof p4 !== 'undefined' ? p4 : 4;\n}");
@@ -380,7 +354,7 @@
     {
         IFunctionNode node = getMethodWithPackage("function method1(bar:int):int{\n}");
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n * @param {number} bar\n * @return {number}\n */\n"
+        assertOut("/**\n * @param {number} bar\n * @return {number}\n */\n"
                 + "foo.bar.RoyaleTest_A.prototype.method1 = function(bar) {\n}");
     }
 
@@ -390,7 +364,7 @@
     {
         IFunctionNode node = getMethodWithPackage("function method1(bar:int, baz:String, goo:Array):void{\n}");
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n * @param {number} bar\n * @param {string} baz\n * @param {Array} goo\n */\n"
+        assertOut("/**\n * @param {number} bar\n * @param {string} baz\n * @param {Array} goo\n */\n"
                 + "foo.bar.RoyaleTest_A.prototype.method1 = function(bar, baz, goo) {\n}");
     }
 
@@ -400,7 +374,7 @@
     {
         IFunctionNode node = getMethodWithPackage("/**\n * This is copied from ASDoc.\n */\nfunction method1(bar:int, baz:String, goo:Array):void{\n}");
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * This is copied from ASDoc.\n * @export\n * @param {number} bar\n * @param {string} baz\n * @param {Array} goo\n */\n"
+        assertOut("/**\n * This is copied from ASDoc.\n * @param {number} bar\n * @param {string} baz\n * @param {Array} goo\n */\n"
                 + "foo.bar.RoyaleTest_A.prototype.method1 = function(bar, baz, goo) {\n}");
     }
 
@@ -409,7 +383,7 @@
     {
         IFunctionNode node = getMethodWithPackage("/** This is copied from ASDoc. */\nfunction method1(bar:int, baz:String, goo:Array):void{\n}");
         asBlockWalker.visitFunction(node);
-        assertOut("/** This is copied from ASDoc. \n * @export\n * @param {number} bar\n * @param {string} baz\n * @param {Array} goo\n */\n"
+        assertOut("/** This is copied from ASDoc. \n * @param {number} bar\n * @param {string} baz\n * @param {Array} goo\n */\n"
                 + "foo.bar.RoyaleTest_A.prototype.method1 = function(bar, baz, goo) {\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 631df2c..1744619 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
@@ -116,21 +116,17 @@
         		  "RoyaleTest_A = function() {\n" +
         		  "};\n\n\n" +
         		  "/**\n" +
-        		  " * Prevent renaming of class. Needed for reflection.\n" +
-        		  " */\n" +
-        		  "goog.exportSymbol('RoyaleTest_A', RoyaleTest_A);\n\n\n" +
-        		  "/**\n" +
-        		  " * @export\n" +
         		  " * @override\n" +
         		  " */\n" +
         		  "RoyaleTest_A.prototype.isDefaultPrevented = function() {\n" +
         		  "  return this.defaultPrevented;\n" +
-        		  "};\n\n\n" +
+                  "};\n\n\n" +
+                  "/**\n * @nocollapse\n * @export\n * @type {Object}\n */\nRoyaleTest_A.prototype.defaultPrevented;\n\n\n" +
         		  "RoyaleTest_A.prototype.get__defaultPrevented = function() {\n" +
         		  "  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);");
     }
 
@@ -158,7 +154,7 @@
         IFunctionNode node = (IFunctionNode)getNode("import custom.TestProxy;import custom.custom_namespace;use namespace custom_namespace;public class RoyaleTest_A extends TestProxy { custom_namespace function foo(){if (a) super.setProperty(a, b);}}",
         					IFunctionNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\nRoyaleTest_A.prototype.http_$$ns_apache_org$2017$custom$namespace__foo = function() {\n  if (a)\n    RoyaleTest_A.superClass_.http_$$ns_apache_org$2017$custom$namespace__setProperty.apply(this, [ a, b] );\n}");
+        assertOut("/**\n */\nRoyaleTest_A.prototype.http_$$ns_apache_org$2017$custom$namespace__foo = function() {\n  if (a)\n    RoyaleTest_A.superClass_.http_$$ns_apache_org$2017$custom$namespace__setProperty.apply(this, [ a, b] );\n}");
     }
 
     @Test
@@ -173,7 +169,7 @@
         IClassDefinition def = classnode.getDefinition();
         ((JSRoyaleEmitter)asEmitter).getModel().setCurrentClass(def);
         asBlockWalker.visitFunction(fnode);
-        assertOut("/**\n * @export\n * @override\n */\nRoyaleTest_A.prototype.foo = function() {\n  var /** @type {Function} */ f = org.apache.royale.utils.Language.closure(RoyaleTest_A.superClass_.foo, this, 'foo');\n}");
+        assertOut("/**\n * @override\n */\nRoyaleTest_A.prototype.foo = function() {\n  var /** @type {Function} */ f = org.apache.royale.utils.Language.closure(RoyaleTest_A.superClass_.foo, this, 'foo');\n}");
     }
     
     @Test
@@ -188,7 +184,7 @@
         IClassDefinition def = classnode.getDefinition();
         ((JSRoyaleEmitter)asEmitter).getModel().setCurrentClass(def);
         asBlockWalker.visitFunction(fnode);
-        assertOut("/**\n * @export\n * @override\n */\nRoyaleTest_A.prototype.foo = function() {\n  var /** @type {Function} */ f = null;\n  f = org.apache.royale.utils.Language.closure(RoyaleTest_A.superClass_.foo, this, 'foo');\n}");
+        assertOut("/**\n * @override\n */\nRoyaleTest_A.prototype.foo = function() {\n  var /** @type {Function} */ f = null;\n  f = org.apache.royale.utils.Language.closure(RoyaleTest_A.superClass_.foo, this, 'foo');\n}");
     }
     
     @Test
@@ -203,7 +199,7 @@
         IClassDefinition def = classnode.getDefinition();
         ((JSRoyaleEmitter)asEmitter).getModel().setCurrentClass(def);
         asBlockWalker.visitFunction(fnode);
-        assertOut("/**\n * @export\n * @override\n */\nRoyaleTest_A.prototype.foo = function() {\n  RoyaleTest_A.superClass_.foo.apply(this, [a, b, c]);\n}");
+        assertOut("/**\n * @override\n */\nRoyaleTest_A.prototype.foo = function() {\n  RoyaleTest_A.superClass_.foo.apply(this, [a, b, c]);\n}");
     }
     
     //----------------------------------
@@ -475,7 +471,7 @@
         // the asdoc so the emitter will suppress the output
         docEmitter.emitMethodDoc(methodNode, asBlockWalker.getProject());
         asBlockWalker.visitBinaryOperator(node);
-        assertOut("/**\n * @royalenoimplicitstringconversion\n * @export\n */\nthis.b = this.c");
+        assertOut("/**\n * @royalenoimplicitstringconversion\n */\nthis.b = this.c");
     }
 
     @Test
@@ -487,6 +483,22 @@
     }
 
     @Test
+    public void testVisitBinaryOperatorNode_XMLChildEqualsTrue()
+    {
+        IBinaryOperatorNode node = getBinaryNode("var var2:XML;var2.child == true");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("var2.child('child') == 'true'");
+    }
+
+    @Test
+    public void testVisitBinaryOperatorNode_XMLChildEqualsFalse()
+    {
+        IBinaryOperatorNode node = getBinaryNode("var var2:XML;var2.child == false");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("var2.child('child') == 'false'");
+    }
+    
+    @Test
     public void testVisitBinaryOperatorNode_AssignmentStringLiteralToString()
     {
         IBinaryOperatorNode node = getBinaryNode("var var1:String;var1 = \"hi\"");
@@ -883,7 +895,7 @@
         IBinaryOperatorNode bnode = (IBinaryOperatorNode) findFirstDescendantOfType(
                 node, IBinaryOperatorNode.class);
         asBlockWalker.visitBinaryOperator(bnode);
-        assertOut("foo.bar.B[\"b\"] = 1");
+        assertOut("foo.bar.B.b = 1");
     }
 
     @Test
@@ -895,7 +907,7 @@
         IBinaryOperatorNode bnode = (IBinaryOperatorNode) findFirstDescendantOfType(
                 node, IBinaryOperatorNode.class);
         asBlockWalker.visitBinaryOperator(bnode);
-        assertOut("foo.bar.B[\"b\"] = 1");
+        assertOut("foo.bar.B.b = 1");
     }
 
     @Test
@@ -907,7 +919,7 @@
         IBinaryOperatorNode bnode = (IBinaryOperatorNode) findFirstDescendantOfType(
                 node, IBinaryOperatorNode.class);
         asBlockWalker.visitBinaryOperator(bnode);
-        assertOut("foo.bar.B[\"d\"].b = 1");
+        assertOut("foo.bar.B.d.b = 1");
     }
 
     @Test
@@ -931,7 +943,7 @@
 
         ((JSRoyaleEmitter)asEmitter).getModel().setCurrentClass(def);
         asBlockWalker.visitBinaryOperator(bnode);
-        assertOut("foo.bar.B[\"d\"].b = 1");
+        assertOut("foo.bar.B.d.b = 1");
     }
 
     @Test
@@ -943,7 +955,7 @@
         IBinaryOperatorNode bnode = (IBinaryOperatorNode) findFirstDescendantOfType(
                 node, IBinaryOperatorNode.class);
         asBlockWalker.visitBinaryOperator(bnode);
-        assertOut("foo.bar.B[\"b\"] = foo.bar.B[\"b\"] + 1");
+        assertOut("foo.bar.B.b = foo.bar.B.b + 1");
     }
 
     @Test
@@ -1061,7 +1073,7 @@
                 "public class B {public function d() { var seed:Number; seed = new Date().time - Math.random() * int.MAX_VALUE; }}",
                 IBinaryOperatorNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitBinaryOperator(node);
-        assertOut("seed = new Date().getTime() - Math.random() * 2147483648");
+        assertOut("seed = new Date().getTime() - Math.random() * 2147483647");
     }
 
     @Test
@@ -1071,7 +1083,7 @@
                 "public class B {public function b() { function c(f:Function):void {}; function d():void {}; c(d); }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\nB.prototype.b = function() {\n  var self = this;\n  function c(f) {\n  };\n  function d() {\n  };\n  c(d);\n}");
+        assertOut("/**\n */\nB.prototype.b = function() {\n  var self = this;\n  function c(f) {\n  };\n  function d() {\n  };\n  c(d);\n}");
     }
 
     @Test
@@ -1081,7 +1093,7 @@
                 "public class B {public function b() { function c(s:String, f:Function):void {}; function d():void {}; c('foo', d); }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\nB.prototype.b = function() {\n  var self = this;\n  function c(s, f) {\n  };\n  function d() {\n  };\n  c('foo', d);\n}");
+        assertOut("/**\n */\nB.prototype.b = function() {\n  var self = this;\n  function c(s, f) {\n  };\n  function d() {\n  };\n  c('foo', d);\n}");
     }
 
     @Test
@@ -1091,7 +1103,7 @@
                 "public class B {public function b() {  c('foo', d); function c(s:String, f:Function):void {}; function d():void {};}}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\nB.prototype.b = function() {\n  var self = this;\n  function c(s, f) {\n  };\n  function d() {\n  };\n  c('foo', d);\n  \n}");
+        assertOut("/**\n */\nB.prototype.b = function() {\n  var self = this;\n  function c(s, f) {\n  };\n  function d() {\n  };\n  c('foo', d);\n  \n}");
     }
 
     @Test
@@ -1101,7 +1113,7 @@
                 "public class B {public function b() { function d():void {}; c('foo', d); } public function c(s:String, f:Function):void {};}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\nB.prototype.b = function() {\n  var self = this;\n  function d() {\n  };\n  this.c('foo', d);\n}");
+        assertOut("/**\n */\nB.prototype.b = function() {\n  var self = this;\n  function d() {\n  };\n  this.c('foo', d);\n}");
     }
 
     @Test
@@ -1111,7 +1123,7 @@
                 "public class B {public function b(ff:Function) { function c(f:Function):void {}; c(ff); }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n * @param {Function} ff\n */\nB.prototype.b = function(ff) {\n  var self = this;\n  function c(f) {\n  };\n  c(ff);\n}");
+        assertOut("/**\n * @param {Function} ff\n */\nB.prototype.b = function(ff) {\n  var self = this;\n  function c(f) {\n  };\n  c(ff);\n}");
     }
 
     @Test
@@ -1121,7 +1133,7 @@
                 "public class B {public static function b(ff:Function) { function c(f:Function):void {}; c(ff); }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n * @param {Function} ff\n */\nB.b = function(ff) {\n  function c(f) {\n  };\n  c(ff);\n}");
+        assertOut("/**\n * @nocollapse\n * @param {Function} ff\n */\nB.b = function(ff) {\n  function c(f) {\n  };\n  c(ff);\n}");
     }
 
     @Test
@@ -1131,7 +1143,7 @@
                 "public class B {public function b() { function c(f:Function):void {}; c(b); }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\nB.prototype.b = function() {\n  var self = this;\n  function c(f) {\n  };\n  c(org.apache.royale.utils.Language.closure(this.b, this, 'b'));\n}");
+        assertOut("/**\n */\nB.prototype.b = function() {\n  var self = this;\n  function c(f) {\n  };\n  c(org.apache.royale.utils.Language.closure(this.b, this, 'b'));\n}");
     }
 
     @Test
@@ -1141,7 +1153,7 @@
                 "public class B {static public function b() { function c(f:Function):void {}; c(b); }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\nfoo.bar.B.b = function() {\n  function c(f) {\n  };\n  c(foo.bar.B.b);\n}");
+        assertOut("/**\n * @nocollapse\n */\nfoo.bar.B.b = function() {\n  function c(f) {\n  };\n  c(foo.bar.B.b);\n}");
     }
 
     @Test
@@ -1151,7 +1163,7 @@
                 "public class B {public function b() { function c(f:Function):void {}; var f:Function = b; c(f); }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\nB.prototype.b = function() {\n  var self = this;\n  function c(f) {\n  };\n  var /** @type {Function} */ f = org.apache.royale.utils.Language.closure(this.b, this, 'b');\n  c(f);\n}");
+        assertOut("/**\n */\nB.prototype.b = function() {\n  var self = this;\n  function c(f) {\n  };\n  var /** @type {Function} */ f = org.apache.royale.utils.Language.closure(this.b, this, 'b');\n  c(f);\n}");
     }
     
     @Test
@@ -1161,7 +1173,7 @@
                 "import custom.custom_namespace; use namespace custom_namespace;public class B {custom_namespace function b() { function c(f:Function):void {}; c(b); }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\nB.prototype.http_$$ns_apache_org$2017$custom$namespace__b = function() {\n  var self = this;\n  function c(f) {\n  };\n  c(org.apache.royale.utils.Language.closure(this.http_$$ns_apache_org$2017$custom$namespace__b, this, 'http://ns.apache.org/2017/custom/namespace::b'));\n}");
+        assertOut("/**\n */\nB.prototype.http_$$ns_apache_org$2017$custom$namespace__b = function() {\n  var self = this;\n  function c(f) {\n  };\n  c(org.apache.royale.utils.Language.closure(this.http_$$ns_apache_org$2017$custom$namespace__b, this, 'http://ns.apache.org/2017/custom/namespace::b'));\n}");
     }
     
     @Test
@@ -1171,7 +1183,7 @@
                 "import custom.custom_namespace;public class B {custom_namespace function b() { function c(f:Function):void {}; c(custom_namespace::b); }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\nB.prototype.http_$$ns_apache_org$2017$custom$namespace__b = function() {\n  var self = this;\n  function c(f) {\n  };\n  c(org.apache.royale.utils.Language.closure(this.http_$$ns_apache_org$2017$custom$namespace__b, this, 'http://ns.apache.org/2017/custom/namespace::b'));\n}");
+        assertOut("/**\n */\nB.prototype.http_$$ns_apache_org$2017$custom$namespace__b = function() {\n  var self = this;\n  function c(f) {\n  };\n  c(org.apache.royale.utils.Language.closure(this.http_$$ns_apache_org$2017$custom$namespace__b, this, 'http://ns.apache.org/2017/custom/namespace::b'));\n}");
     }
     
     @Test
@@ -1181,7 +1193,7 @@
                 "import custom.custom_namespace; use namespace custom_namespace;public class B {custom_namespace function b() { function c(f:Function):void {}; var f:Function = b; c(f); }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\nB.prototype.http_$$ns_apache_org$2017$custom$namespace__b = function() {\n  var self = this;\n  function c(f) {\n  };\n  var /** @type {Function} */ f = org.apache.royale.utils.Language.closure(this.http_$$ns_apache_org$2017$custom$namespace__b, this, 'http://ns.apache.org/2017/custom/namespace::b');\n  c(f);\n}");
+        assertOut("/**\n */\nB.prototype.http_$$ns_apache_org$2017$custom$namespace__b = function() {\n  var self = this;\n  function c(f) {\n  };\n  var /** @type {Function} */ f = org.apache.royale.utils.Language.closure(this.http_$$ns_apache_org$2017$custom$namespace__b, this, 'http://ns.apache.org/2017/custom/namespace::b');\n  c(f);\n}");
     }
     
     @Test
@@ -1191,7 +1203,7 @@
                 "import custom.custom_namespace;;public class B {custom_namespace function b() { function c(f:Function):void {}; var f:Function = this.custom_namespace::b; c(f); }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\nB.prototype.http_$$ns_apache_org$2017$custom$namespace__b = function() {\n  var self = this;\n  function c(f) {\n  };\n  var /** @type {Function} */ f = org.apache.royale.utils.Language.closure(this[new QName(custom.custom_namespace, 'b').objectAccessFormat()], this, 'http://ns.apache.org/2017/custom/namespace::b');\n  c(f);\n}");
+        assertOut("/**\n */\nB.prototype.http_$$ns_apache_org$2017$custom$namespace__b = function() {\n  var self = this;\n  function c(f) {\n  };\n  var /** @type {Function} */ f = org.apache.royale.utils.Language.closure(this[new QName(custom.custom_namespace, 'b').objectAccessFormat()], this, 'http://ns.apache.org/2017/custom/namespace::b');\n  c(f);\n}");
     }
     
     @Test
@@ -1201,7 +1213,7 @@
                 "import custom.custom_namespace; use namespace custom_namespace;public class B {custom_namespace function b():int { return this.b(); }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n * @return {number}\n */\nB.prototype.http_$$ns_apache_org$2017$custom$namespace__b = function() {\n  return this.http_$$ns_apache_org$2017$custom$namespace__b();\n}");
+        assertOut("/**\n * @return {number}\n */\nB.prototype.http_$$ns_apache_org$2017$custom$namespace__b = function() {\n  return this.http_$$ns_apache_org$2017$custom$namespace__b();\n}");
     }
     
     @Test
@@ -1211,7 +1223,7 @@
                 "public class B {static public function b() { function c(f:Function):void {}; var f:Function = b; c(f); }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\nfoo.bar.B.b = function() {\n  function c(f) {\n  };\n  var /** @type {Function} */ f = foo.bar.B.b;\n  c(f);\n}");
+        assertOut("/**\n * @nocollapse\n */\nfoo.bar.B.b = function() {\n  function c(f) {\n  };\n  var /** @type {Function} */ f = foo.bar.B.b;\n  c(f);\n}");
     }
     
     @Test
@@ -1221,7 +1233,7 @@
                 "public class B {static public function b() { function c(f:Function):void {}; var f:Function = foo.bar.B.b; c(f); }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\nfoo.bar.B.b = function() {\n  function c(f) {\n  };\n  var /** @type {Function} */ f = foo.bar.B.b;\n  c(f);\n}");
+        assertOut("/**\n * @nocollapse\n */\nfoo.bar.B.b = function() {\n  function c(f) {\n  };\n  var /** @type {Function} */ f = foo.bar.B.b;\n  c(f);\n}");
     }
     
     @Test
@@ -1231,7 +1243,7 @@
                 "public class B {public function b() { function c(f:Function):void {}; var f:Function = null; f = b; c(f); }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\nB.prototype.b = function() {\n  var self = this;\n  function c(f) {\n  };\n  var /** @type {Function} */ f = null;\n  f = org.apache.royale.utils.Language.closure(this.b, this, 'b');\n  c(f);\n}");
+        assertOut("/**\n */\nB.prototype.b = function() {\n  var self = this;\n  function c(f) {\n  };\n  var /** @type {Function} */ f = null;\n  f = org.apache.royale.utils.Language.closure(this.b, this, 'b');\n  c(f);\n}");
     }
     
     @Test
@@ -1241,7 +1253,7 @@
                 "public class B {static public function b() { function c(f:Function):void {}; var f:Function = null; f = b; c(f); }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\nfoo.bar.B.b = function() {\n  function c(f) {\n  };\n  var /** @type {Function} */ f = null;\n  f = foo.bar.B.b;\n  c(f);\n}");
+        assertOut("/**\n * @nocollapse\n */\nfoo.bar.B.b = function() {\n  function c(f) {\n  };\n  var /** @type {Function} */ f = null;\n  f = foo.bar.B.b;\n  c(f);\n}");
     }
     
     @Test
@@ -1251,7 +1263,7 @@
                 "public class B {public function b() { function c(f:Function):void {}; var f:Array = [b]; c(f[0]); }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\nB.prototype.b = function() {\n  var self = this;\n  function c(f) {\n  };\n  var /** @type {Array} */ f = [org.apache.royale.utils.Language.closure(this.b, this, 'b')];\n  c(/* implicit cast */ org.apache.royale.utils.Language.as(f[0], Function, true));\n}");
+        assertOut("/**\n */\nB.prototype.b = function() {\n  var self = this;\n  function c(f) {\n  };\n  var /** @type {Array} */ f = [org.apache.royale.utils.Language.closure(this.b, this, 'b')];\n  c(/* implicit cast */ org.apache.royale.utils.Language.as(f[0], Function, true));\n}");
     }
     
     @Test
@@ -1261,7 +1273,7 @@
                 "public class B {static public function b() { function c(f:Function):void {}; var f:Array = [b]; c(f); }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\nfoo.bar.B.b = function() {\n  function c(f) {\n  };\n  var /** @type {Array} */ f = [foo.bar.B.b];\n  c(f);\n}");
+        assertOut("/**\n * @nocollapse\n */\nfoo.bar.B.b = function() {\n  function c(f) {\n  };\n  var /** @type {Array} */ f = [foo.bar.B.b];\n  c(f);\n}");
     }
     
     @Test
@@ -1271,7 +1283,7 @@
                 "public class B {public function b() { function c(f:Function):void {}; c(this.b); }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\nB.prototype.b = function() {\n  var self = this;\n  function c(f) {\n  };\n  c(org.apache.royale.utils.Language.closure(this.b, this, 'b'));\n}");
+        assertOut("/**\n */\nB.prototype.b = function() {\n  var self = this;\n  function c(f) {\n  };\n  c(org.apache.royale.utils.Language.closure(this.b, this, 'b'));\n}");
     }
     
     @Test
@@ -1281,7 +1293,7 @@
                 "public class B {public function b() { function c(f:Function):void {c(d); }; } public function d() {}}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\nB.prototype.b = function() {\n  var self = this;\n  function c(f) {\n    c(org.apache.royale.utils.Language.closure(self.d, self, 'd'));\n  };\n  \n}");
+        assertOut("/**\n */\nB.prototype.b = function() {\n  var self = this;\n  function c(f) {\n    c(org.apache.royale.utils.Language.closure(self.d, self, 'd'));\n  };\n  \n}");
     }
     
     @Test
@@ -1292,7 +1304,7 @@
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
         asBlockWalker.visitFunction(node);
         // String.length is a getter but is a property in JS, so don't generate set_length() call.
-        assertOut("/**\n * @export\n * @return {number}\n */\nfoo.bar.B.prototype.b = function() {\n  var /** @type {string} */ s = null;\n  return s.length;\n}");
+        assertOut("/**\n * @return {number}\n */\nfoo.bar.B.prototype.b = function() {\n  var /** @type {string} */ s = null;\n  return s.length;\n}");
     }
 
     @Test
@@ -1303,7 +1315,7 @@
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
         asBlockWalker.visitFunction(node);
         // String.length is a getter but is a property in JS, so don't generate set_length() call.
-        assertOut("/**\n * @export\n * @return {number}\n */\nfoo.bar.B.prototype.b = function() {\n  var /** @type {Array.<string>} */ a = null;\n  return a.length;\n}");
+        assertOut("/**\n * @return {number}\n */\nfoo.bar.B.prototype.b = function() {\n  var /** @type {Array.<string>} */ a = null;\n  return a.length;\n}");
     }
 
     @Test
@@ -1313,7 +1325,7 @@
                 "public class B { public function a():void { b(c); } public function set b(v:Function):void {}  public function get b():Function { return null; } public function get c():Object { return null; } public function set c(v:Object):void {} }",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\nB.prototype.a = function() {\n  this.b(this.c);\n}");
+        assertOut("/**\n */\nB.prototype.a = function() {\n  this.b(this.c);\n}");
     }
     
     //----------------------------------
@@ -1325,7 +1337,7 @@
     {
         IClassNode node = (IClassNode) getNode("import custom.TestOtherInterface; public class B implements TestOtherInterface { public function B() { TestOtherInterface(b).type = ''; } }", ClassNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n * @implements {custom.TestOtherInterface}\n */\nB = function() {\n  org.apache.royale.utils.Language.as(b, custom.TestOtherInterface, true).type = '';\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('B', B);");
+        assertOut("/**\n * @constructor\n * @implements {custom.TestOtherInterface}\n */\nB = function() {\n  org.apache.royale.utils.Language.as(b, custom.TestOtherInterface, true).type = '';\n};");
     }
 
     @Test
@@ -1351,7 +1363,7 @@
                 "import goog.bind; public class B {public function b() { goog.bind(b, this); }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\nfoo.bar.B.prototype.b = function() {\n  goog.bind(org.apache.royale.utils.Language.closure(this.b, this, 'b'), this);\n}");
+        assertOut("/**\n */\nfoo.bar.B.prototype.b = function() {\n  goog.bind(org.apache.royale.utils.Language.closure(this.b, this, 'b'), this);\n}");
     }
     
     @Test
@@ -1372,7 +1384,7 @@
                 "import custom.custom_namespace; public class B {custom_namespace function b() { custom_namespace::b(); }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\nfoo.bar.B.prototype.http_$$ns_apache_org$2017$custom$namespace__b = function() {\n  this.http_$$ns_apache_org$2017$custom$namespace__b();\n}");
+        assertOut("/**\n */\nfoo.bar.B.prototype.http_$$ns_apache_org$2017$custom$namespace__b = function() {\n  this.http_$$ns_apache_org$2017$custom$namespace__b();\n}");
     }
 
     @Test
@@ -1382,7 +1394,7 @@
                 "import custom.TestGlobalFunction; public class B {public function b() { TestGlobalFunction.length; }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\nfoo.bar.B.prototype.b = function() {\n  custom.TestGlobalFunction.length;\n}");
+        assertOut("/**\n */\nfoo.bar.B.prototype.b = function() {\n  custom.TestGlobalFunction.length;\n}");
     }
 
     @Test
@@ -1390,7 +1402,7 @@
     {
         IFunctionNode node = getMethod("function foo(b:Boolean):Boolean {var c:String = null; var d:String = null; if (!(b ? c : d)) { return b;}}");
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n * @param {boolean} b\n * @return {boolean}\n */\nRoyaleTest_A.prototype.foo = function(b) {\n  var /** @type {string} */ c = null;\n  var /** @type {string} */ d = null;\n  if (!(b ? c : d)) {\n    return b;\n  }\n}");
+        assertOut("/**\n * @param {boolean} b\n * @return {boolean}\n */\nRoyaleTest_A.prototype.foo = function(b) {\n  var /** @type {string} */ c = null;\n  var /** @type {string} */ d = null;\n  if (!(b ? c : d)) {\n    return b;\n  }\n}");
     }
 
     @Override
@@ -1507,7 +1519,7 @@
                 "});}",
                 IFunctionNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\n" + 
+        assertOut("/**\n */\n" + 
       		  "RoyaleTest_A.prototype.foo = function() {\n" +
       		  "  var self = this;\n" +
       		  "  function isEven(element, index, arr) {\n    return element % 2 == 0;\n  };\n  var /** @type {Array} */ a = [];\n"
@@ -1521,7 +1533,7 @@
                 "public var bar:String = baz; public function foo():void { function localFunction():void { trace(bar); } localFunction() }",
                 IFunctionNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\n" + 
+        assertOut("/**\n */\n" + 
         		  "RoyaleTest_A.prototype.foo = function() {\n" +
         		  "  var self = this;\n" +
         		  "  function localFunction() {\n    org.apache.royale.utils.Language.trace(self.bar);\n  };\n" +
@@ -1535,7 +1547,7 @@
                 "internal var bar:String = baz; public function foo():void { trace(bar); }",
                 IFunctionNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\n" + 
+        assertOut("/**\n */\n" + 
         		  "RoyaleTest_A.prototype.foo = function() {\n" +
         		  "  org.apache.royale.utils.Language.trace(this.bar);\n}");
     }
@@ -1556,7 +1568,7 @@
                 "public class B {public function b(o:Object):int { var a:B = null; a = o as B; }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.B.prototype.b = function(o) {\n  var /** @type {foo.bar.B} */ a = null;\n  a = org.apache.royale.utils.Language.as(o, foo.bar.B);\n}");
+        assertOut("/**\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.B.prototype.b = function(o) {\n  var /** @type {foo.bar.B} */ a = null;\n  a = org.apache.royale.utils.Language.as(o, foo.bar.B);\n}");
     }
 
     @Test
@@ -1582,7 +1594,7 @@
                 "public class B {private var memberVar:Class; public function b(o:Object):int { var a:B = null; a = o as memberVar; }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.B.prototype.b = function(o) {\n  var /** @type {foo.bar.B} */ a = null;\n  a = /* implicit cast */ org.apache.royale.utils.Language.as(org.apache.royale.utils.Language.as(o, this.memberVar), foo.bar.B, true);\n}");
+        assertOut("/**\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.B.prototype.b = function(o) {\n  var /** @type {foo.bar.B} */ a = null;\n  a = /* implicit cast */ org.apache.royale.utils.Language.as(org.apache.royale.utils.Language.as(o, this.memberVar), foo.bar.B, true);\n}");
     }
     
      @Test
@@ -1592,7 +1604,7 @@
                  "public class B {private var memberVar:Class; /**\n * @royalesuppresscompleximplicitcoercion\n */\n public function b(o:Object):int { var a:B = null; a = o as memberVar; }}",
                  IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
          asBlockWalker.visitFunction(node);
-         assertOut("/**\n * @royalesuppresscompleximplicitcoercion\n * @export\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.B.prototype.b = function(o) {\n  var /** @type {foo.bar.B} */ a = null;\n  a = org.apache.royale.utils.Language.as(o, this.memberVar);\n}");
+         assertOut("/**\n * @royalesuppresscompleximplicitcoercion\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.B.prototype.b = function(o) {\n  var /** @type {foo.bar.B} */ a = null;\n  a = org.apache.royale.utils.Language.as(o, this.memberVar);\n}");
      }
     
      @Test
@@ -1602,7 +1614,7 @@
                  "public class B {private var memberVar:Class; /**\n * @royalesuppresscompleximplicitcoercion true\n */\n public function b(o:Object):int { var a:B = null; a = o as memberVar; }}",
                  IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
          asBlockWalker.visitFunction(node);
-         assertOut("/**\n * @royalesuppresscompleximplicitcoercion true\n * @export\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.B.prototype.b = function(o) {\n  var /** @type {foo.bar.B} */ a = null;\n  a = org.apache.royale.utils.Language.as(o, this.memberVar);\n}");
+         assertOut("/**\n * @royalesuppresscompleximplicitcoercion true\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.B.prototype.b = function(o) {\n  var /** @type {foo.bar.B} */ a = null;\n  a = org.apache.royale.utils.Language.as(o, this.memberVar);\n}");
      }
     
      @Test
@@ -1612,7 +1624,7 @@
                  "public class B {private var memberVar:Class; /**\n * @royalesuppresscompleximplicitcoercion foo.bar.B\n */\n public function b(o:Object):int { var a:B = null; a = o as memberVar; }}",
                  IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
          asBlockWalker.visitFunction(node);
-         assertOut("/**\n * @royalesuppresscompleximplicitcoercion foo.bar.B\n * @export\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.B.prototype.b = function(o) {\n  var /** @type {foo.bar.B} */ a = null;\n  a = org.apache.royale.utils.Language.as(o, this.memberVar);\n}");
+         assertOut("/**\n * @royalesuppresscompleximplicitcoercion foo.bar.B\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.B.prototype.b = function(o) {\n  var /** @type {foo.bar.B} */ a = null;\n  a = org.apache.royale.utils.Language.as(o, this.memberVar);\n}");
      }
     
     
@@ -1630,7 +1642,7 @@
                  "public class B {private var memberVar:Class; public function b(o:Object):int { var a:B = null; a = o as memberVar; }}",
                  IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
          asBlockWalker.visitFunction(node);
-         assertOut("/**\n * @export\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.B.prototype.b = function(o) {\n  var /** @type {foo.bar.B} */ a = null;\n  a = org.apache.royale.utils.Language.as(o, this.memberVar);\n}");
+         assertOut("/**\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.B.prototype.b = function(o) {\n  var /** @type {foo.bar.B} */ a = null;\n  a = org.apache.royale.utils.Language.as(o, this.memberVar);\n}");
      }
     
      @Test
@@ -1647,7 +1659,7 @@
                  "public class B {private var memberVar:Class; /**\n * @royalesuppresscompleximplicitcoercion false\n */\n public function b(o:Object):int { var a:B = null; a = o as memberVar; }}",
                  IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
          asBlockWalker.visitFunction(node);
-         assertOut("/**\n * @royalesuppresscompleximplicitcoercion false\n * @export\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.B.prototype.b = function(o) {\n  var /** @type {foo.bar.B} */ a = null;\n  a = /* implicit cast */ org.apache.royale.utils.Language.as(org.apache.royale.utils.Language.as(o, this.memberVar), foo.bar.B, true);\n}");
+         assertOut("/**\n * @royalesuppresscompleximplicitcoercion false\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.B.prototype.b = function(o) {\n  var /** @type {foo.bar.B} */ a = null;\n  a = /* implicit cast */ org.apache.royale.utils.Language.as(org.apache.royale.utils.Language.as(o, this.memberVar), foo.bar.B, true);\n}");
      }
 
     @Test
@@ -1657,7 +1669,7 @@
                 "public class LinkableString {public function b(o:Object):int { var a:LinkableString = null; a = o as LinkableString; }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.LinkableString.prototype.b = function(o) {\n  var /** @type {foo.bar.LinkableString} */ a = null;\n  a = org.apache.royale.utils.Language.as(o, foo.bar.LinkableString);\n}");
+        assertOut("/**\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.LinkableString.prototype.b = function(o) {\n  var /** @type {foo.bar.LinkableString} */ a = null;\n  a = org.apache.royale.utils.Language.as(o, foo.bar.LinkableString);\n}");
     }
 
     @Override
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleFieldMembers.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleFieldMembers.java
index f92714a..fb4b64d 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleFieldMembers.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleFieldMembers.java
@@ -44,7 +44,7 @@
     {
         IVariableNode node = getField("var foo;");
         asBlockWalker.visitVariable(node);
-        assertOut("/**\n * @type {*}\n */\nRoyaleTest_A.prototype.foo");
+        assertOut("/**\n * @package\n * @type {*}\n */\nRoyaleTest_A.prototype.foo");
     }
 
     @Test
@@ -52,7 +52,7 @@
     {
         IVariableNode node = getField("public var foo:String = null;");
         asBlockWalker.visitVariable(node);
-        assertOut("/**\n * @export\n * @type {string}\n */\nRoyaleTest_A.prototype.foo = null");
+        assertOut("/**\n * @type {string}\n */\nRoyaleTest_A.prototype.foo = null");
     }
 
     @Override
@@ -61,7 +61,7 @@
     {
         IVariableNode node = getField("public var foo:int;");
         asBlockWalker.visitVariable(node);
-        assertOut("/**\n * @export\n * @type {number}\n */\nRoyaleTest_A.prototype.foo = 0");
+        assertOut("/**\n * @type {number}\n */\nRoyaleTest_A.prototype.foo = 0");
     }
 
     @Override
@@ -70,7 +70,7 @@
     {
         IVariableNode node = getField("public var foo:int = 420;");
         asBlockWalker.visitVariable(node);
-        assertOut("/**\n * @export\n * @type {number}\n */\nRoyaleTest_A.prototype.foo = 420");
+        assertOut("/**\n * @type {number}\n */\nRoyaleTest_A.prototype.foo = 420");
     }
 
     @Test
@@ -78,7 +78,7 @@
     {
         IVariableNode node = getField("public var foo:int = -420;");
         asBlockWalker.visitVariable(node);
-        assertOut("/**\n * @export\n * @type {number}\n */\nRoyaleTest_A.prototype.foo = -420");
+        assertOut("/**\n * @type {number}\n */\nRoyaleTest_A.prototype.foo = -420");
     }
 
     @Test
@@ -86,7 +86,7 @@
     {
         IVariableNode node = getField("public var foo:int = -123.4;");
         asBlockWalker.visitVariable(node);
-        assertOut("/**\n * @export\n * @type {number}\n */\nRoyaleTest_A.prototype.foo = -123");
+        assertOut("/**\n * @type {number}\n */\nRoyaleTest_A.prototype.foo = -123");
     }
 
     @Test
@@ -94,7 +94,7 @@
     {
         IVariableNode node = getField("public var foo:uint = 123.4;");
         asBlockWalker.visitVariable(node);
-        assertOut("/**\n * @export\n * @type {number}\n */\nRoyaleTest_A.prototype.foo = 123");
+        assertOut("/**\n * @type {number}\n */\nRoyaleTest_A.prototype.foo = 123");
     }
 
     @Test
@@ -102,7 +102,7 @@
     {
         IVariableNode node = getField("public var foo:uint = -123;");
         asBlockWalker.visitVariable(node);
-        assertOut("/**\n * @export\n * @type {number}\n */\nRoyaleTest_A.prototype.foo = 4294967173");
+        assertOut("/**\n * @type {number}\n */\nRoyaleTest_A.prototype.foo = 4294967173");
     }
 
     @Test
@@ -159,7 +159,7 @@
     	IClassNode node = (IClassNode) getNode("protected var foo:Foo = new Foo('bar', 42);",
     			IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n\nthis.foo = new Foo('bar', 42);\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('RoyaleTest_A', RoyaleTest_A);\n\n\n/**\n * @protected\n * @type {Foo}\n */\nRoyaleTest_A.prototype.foo;");
+        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n\nthis.foo = new Foo('bar', 42);\n};\n\n\n/**\n * @protected\n * @type {Foo}\n */\nRoyaleTest_A.prototype.foo;");
     }
 
     @Test
@@ -167,7 +167,7 @@
     {
         IVariableNode node = getField("static var foo;");
         asBlockWalker.visitVariable(node);
-        assertOut("/**\n * @type {*}\n */\nRoyaleTest_A.foo");
+        assertOut("/**\n * @package\n * @type {*}\n */\nRoyaleTest_A.foo");
     }
 
     @Test
@@ -175,7 +175,7 @@
     {
         IVariableNode node = getField("public static var foo:int;");
         asBlockWalker.visitVariable(node);
-        assertOut("/**\n * @export\n * @type {number}\n */\nRoyaleTest_A.foo = 0");
+        assertOut("/**\n * @type {number}\n */\nRoyaleTest_A.foo = 0");
     }
 
     @Test
@@ -183,7 +183,7 @@
     {
         IVariableNode node = getField("static var foo:int = 420;");
         asBlockWalker.visitVariable(node);
-        assertOut("/**\n * @type {number}\n */\nRoyaleTest_A.foo = 420");
+        assertOut("/**\n * @package\n * @type {number}\n */\nRoyaleTest_A.foo = 420");
     }
 
     @Test
@@ -192,7 +192,7 @@
     	IClassNode node = (IClassNode) getNode("protected var foo:Array = [ 'foo' ]",
         		IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n\nthis.foo = ['foo'];\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('RoyaleTest_A', RoyaleTest_A);\n\n\n/**\n * @protected\n * @type {Array}\n */\nRoyaleTest_A.prototype.foo;");
+        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n\nthis.foo = ['foo'];\n};\n\n\n/**\n * @protected\n * @type {Array}\n */\nRoyaleTest_A.prototype.foo;");
     }
     
     @Test
@@ -201,7 +201,7 @@
     	IClassNode node = (IClassNode) getNode("protected var foo:Object = { 'foo': 'bar' }",
         		IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n\nthis.foo = {'foo':'bar'};\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('RoyaleTest_A', RoyaleTest_A);\n\n\n/**\n * @protected\n * @type {Object}\n */\nRoyaleTest_A.prototype.foo;");
+        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n\nthis.foo = {'foo':'bar'};\n};\n\n\n/**\n * @protected\n * @type {Object}\n */\nRoyaleTest_A.prototype.foo;");
     }
     
     @Test
@@ -210,7 +210,7 @@
     	IClassNode node = (IClassNode) getNode("import custom.custom_namespace;use namespace custom_namespace;public static var foo:Object = initFoo(); custom_namespace static function initFoo():Object { return null; }",
         		IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('RoyaleTest_A', RoyaleTest_A);\n\n\n/**\n * @export\n * @type {Object}\n */\nRoyaleTest_A.foo;\n\n\n/**\n * @export\n * @return {Object}\n */\nRoyaleTest_A.http_$$ns_apache_org$2017$custom$namespace__initFoo = function() {\n  return null;\n};\n\nRoyaleTest_A.foo = RoyaleTest_A.http_$$ns_apache_org$2017$custom$namespace__initFoo();\n\n");
+        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n * @type {Object}\n */\nRoyaleTest_A.foo;\n\n\n/**\n * @return {Object}\n */\nRoyaleTest_A.http_$$ns_apache_org$2017$custom$namespace__initFoo = function() {\n  return null;\n};\n\nRoyaleTest_A.foo = RoyaleTest_A.http_$$ns_apache_org$2017$custom$namespace__initFoo();\n\n");
     }
     
     @Test
@@ -219,7 +219,7 @@
     	IClassNode node = (IClassNode) getNode("static public var foo:Object = { 'foo': 'bar' }",
         		IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('RoyaleTest_A', RoyaleTest_A);\n\n\n/**\n * @export\n * @type {Object}\n */\nRoyaleTest_A.foo = {'foo':'bar'};");
+        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n * @type {Object}\n */\nRoyaleTest_A.foo = {'foo':'bar'};");
     }
     
     @Test
@@ -228,7 +228,7 @@
     	IClassNode node = (IClassNode) getNode("protected var foo:Number = parseFloat('1E2')",
         		IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n\nthis.foo = parseFloat('1E2');\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('RoyaleTest_A', RoyaleTest_A);\n\n\n/**\n * @protected\n * @type {number}\n */\nRoyaleTest_A.prototype.foo;");
+        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n\nthis.foo = parseFloat('1E2');\n};\n\n\n/**\n * @protected\n * @type {number}\n */\nRoyaleTest_A.prototype.foo;");
     }
     
     @Test
@@ -237,7 +237,7 @@
     	IClassNode node = (IClassNode) getNode("private static var empty:Function = function():void {}",
         		IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('RoyaleTest_A', RoyaleTest_A);\n\n\n/**\n * @private\n * @type {Function}\n */\nRoyaleTest_A.empty = function() {\n};");
+        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n * @private\n * @type {Function}\n */\nRoyaleTest_A.empty = function() {\n};");
     }
     
     @Override
@@ -259,7 +259,7 @@
     {
         IVariableNode node = getField("public static const foo;");
         asBlockWalker.visitVariable(node);
-        assertOut("/**\n * @export\n * @const\n * @type {*}\n */\nRoyaleTest_A.foo");
+        assertOut("/**\n * @const\n * @type {*}\n */\nRoyaleTest_A.foo");
     }
 
     @Test
@@ -267,7 +267,7 @@
     {
         IVariableNode node = getField("public const foo;");
         asBlockWalker.visitVariable(node);
-        assertOut("/**\n * @export\n * @const\n * @type {*}\n */\nRoyaleTest_A.prototype.foo");
+        assertOut("/**\n * @const\n * @type {*}\n */\nRoyaleTest_A.prototype.foo");
     }
 
     @Override
@@ -276,7 +276,7 @@
     {
         IVariableNode node = getField("public static const foo:int;");
         asBlockWalker.visitVariable(node);
-        assertOut("/**\n * @export\n * @const\n * @type {number}\n */\nRoyaleTest_A.foo = 0");
+        assertOut("/**\n * @const\n * @type {number}\n */\nRoyaleTest_A.foo = 0");
     }
 
     @Test
@@ -284,7 +284,7 @@
     {
         IVariableNode node = getField("public const foo:int;");
         asBlockWalker.visitVariable(node);
-        assertOut("/**\n * @export\n * @const\n * @type {number}\n */\nRoyaleTest_A.prototype.foo = 0");
+        assertOut("/**\n * @const\n * @type {number}\n */\nRoyaleTest_A.prototype.foo = 0");
     }
 
     @Override
@@ -293,7 +293,7 @@
     {
         IVariableNode node = getField("public static const foo:int = 420;");
         asBlockWalker.visitVariable(node);
-        assertOut("/**\n * @export\n * @const\n * @type {number}\n */\nRoyaleTest_A.foo = 420");
+        assertOut("/**\n * @const\n * @type {number}\n */\nRoyaleTest_A.foo = 420");
     }
 
     @Test
@@ -301,7 +301,7 @@
     {
         IVariableNode node = getField("public static const foo:Number = parseFloat('1E2');");
         asBlockWalker.visitVariable(node);
-        assertOut("/**\n * @export\n * @const\n * @type {number}\n */\nRoyaleTest_A.foo = parseFloat('1E2')");
+        assertOut("/**\n * @const\n * @type {number}\n */\nRoyaleTest_A.foo = parseFloat('1E2')");
     }
 
     @Test
@@ -309,7 +309,7 @@
     {
         IVariableNode node = getField("public const foo:int = 420;");
         asBlockWalker.visitVariable(node);
-        assertOut("/**\n * @export\n * @const\n * @type {number}\n */\nRoyaleTest_A.prototype.foo = 420");
+        assertOut("/**\n * @const\n * @type {number}\n */\nRoyaleTest_A.prototype.foo = 420");
     }
 
     @Test
@@ -318,7 +318,7 @@
     	IClassNode node = (IClassNode) getNode("protected const foo:Number = parseFloat('1E2');",
     			IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n\nthis.foo = parseFloat('1E2');\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('RoyaleTest_A', RoyaleTest_A);\n\n\n/**\n * @protected\n * @const\n * @type {number}\n */\nRoyaleTest_A.prototype.foo;");
+        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n\nthis.foo = parseFloat('1E2');\n};\n\n\n/**\n * @protected\n * @const\n * @type {number}\n */\nRoyaleTest_A.prototype.foo;");
     }
     
     @Test
@@ -327,7 +327,7 @@
     	IClassNode node = (IClassNode) getNode("protected const foo:Array = [ 'foo' ]",
         		IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n\nthis.foo = ['foo'];\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('RoyaleTest_A', RoyaleTest_A);\n\n\n/**\n * @protected\n * @const\n * @type {Array}\n */\nRoyaleTest_A.prototype.foo;");
+        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n\nthis.foo = ['foo'];\n};\n\n\n/**\n * @protected\n * @const\n * @type {Array}\n */\nRoyaleTest_A.prototype.foo;");
     }
     
     @Test
@@ -336,7 +336,7 @@
     	IClassNode node = (IClassNode) getNode("protected const foo:Object = { 'foo': 'bar' }",
         		IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n\nthis.foo = {'foo':'bar'};\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('RoyaleTest_A', RoyaleTest_A);\n\n\n/**\n * @protected\n * @const\n * @type {Object}\n */\nRoyaleTest_A.prototype.foo;");
+        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n\nthis.foo = {'foo':'bar'};\n};\n\n\n/**\n * @protected\n * @const\n * @type {Object}\n */\nRoyaleTest_A.prototype.foo;");
     }
 
     @Override
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleGlobalClasses.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleGlobalClasses.java
index bae6cd4..d93c34e 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleGlobalClasses.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleGlobalClasses.java
@@ -270,7 +270,7 @@
     {
         IVariableNode node = getVariable("var a:Number = int.MAX_VALUE");
         asBlockWalker.visitVariable(node);
-        assertOut("var /** @type {number} */ a = 2147483648");
+        assertOut("var /** @type {number} */ a = 2147483647");
     }
 
     @Test
@@ -303,7 +303,7 @@
     {
         IVariableNode node = getVariable("var a:Number = Math.PI;");
         asBlockWalker.visitVariable(node);
-        assertOut("var /** @type {number} */ a = Math[\"PI\"]");
+        assertOut("var /** @type {number} */ a = Math.PI");
     }
     
     @Override
@@ -923,7 +923,7 @@
         VariableNode node = (VariableNode)getNode("private static function get txtStr():String { return 'foo'; }; private function test() { var a:XML = <text><content>{txtStr}</content></text>;}",
         							 VariableNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitVariable(node);
-        assertOut("var /** @type {XML} */ a = new XML( '<text><content>' + RoyaleTest_A[\"txtStr\"] + '</content></text>')");
+        assertOut("var /** @type {XML} */ a = new XML( '<text><content>' + RoyaleTest_A.txtStr + '</content></text>')");
     }
     
     @Test
@@ -1465,7 +1465,7 @@
                 "import custom.TestProxy; public class B {public function b() { var a:TestProxy = new TestProxy();a.foo = 'bar'; }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\nfoo.bar.B.prototype.b = function() {\n  var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n  a.setProperty('foo', 'bar');\n}");
+        assertOut("/**\n */\nfoo.bar.B.prototype.b = function() {\n  var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n  a.setProperty('foo', 'bar');\n}");
     }
     
     @Test
@@ -1475,7 +1475,7 @@
                 "import custom.TestProxy; public class B {public function b() { var a:TestProxy = new TestProxy();a['foo'] = 'bar'; }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\nfoo.bar.B.prototype.b = function() {\n  var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n  a.setProperty('foo', 'bar');\n}");
+        assertOut("/**\n */\nfoo.bar.B.prototype.b = function() {\n  var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n  a.setProperty('foo', 'bar');\n}");
     }
     
     @Test
@@ -1485,7 +1485,7 @@
                 "import custom.TestProxy; public class B {public function b() { var a:TestProxy = new TestProxy();var foo:String;a[foo] = 'bar'; }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\nfoo.bar.B.prototype.b = function() {\n  var /** @type {string} */ foo = null;\n  var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n  //var /** @type {string} */ foo = null;\n  a.setProperty(foo, 'bar');\n}");
+        assertOut("/**\n */\nfoo.bar.B.prototype.b = function() {\n  var /** @type {string} */ foo = null;\n  var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n  //var /** @type {string} */ foo = null;\n  a.setProperty(foo, 'bar');\n}");
     }
     
     @Test
@@ -1495,7 +1495,7 @@
                 "import custom.TestProxy; public class B {public function b() { var a:TestProxy = new TestProxy();var foo:uint = 0;a[foo] = 'bar'; }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\nfoo.bar.B.prototype.b = function() {\n  var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n  var /** @type {number} */ foo = 0;\n  a.setProperty(foo, 'bar');\n}");
+        assertOut("/**\n */\nfoo.bar.B.prototype.b = function() {\n  var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n  var /** @type {number} */ foo = 0;\n  a.setProperty(foo, 'bar');\n}");
     }
     
     @Test
@@ -1505,7 +1505,7 @@
                 "import custom.TestProxy; public class B {public function b() { var a:TestProxy = new TestProxy();var bar:* = a.foo; }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\nfoo.bar.B.prototype.b = function() {\n  var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n  var /** @type {*} */ bar = a.getProperty('foo');\n}");
+        assertOut("/**\n */\nfoo.bar.B.prototype.b = function() {\n  var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n  var /** @type {*} */ bar = a.getProperty('foo');\n}");
     }
     
     @Test
@@ -1515,7 +1515,7 @@
                 "import custom.TestProxy; public class B {public function b() { var a:TestProxy = new TestProxy(); if (a[0] != null) return; }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\nfoo.bar.B.prototype.b = function() {\n  var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n  if (a.getProperty(0) != null)\n    return;\n}");
+        assertOut("/**\n */\nfoo.bar.B.prototype.b = function() {\n  var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n  if (a.getProperty(0) != null)\n    return;\n}");
     }
     
     @Test
@@ -1525,7 +1525,7 @@
                 "import custom.TestProxy; public class B {public function b() { var a:TestProxy = new TestProxy();var bar:* = a.foo(10,\"ten\"); }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\nfoo.bar.B.prototype.b = function() {\n  var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n  var /** @type {*} */ bar = a.callProperty('foo', 10, \"ten\");\n}");
+        assertOut("/**\n */\nfoo.bar.B.prototype.b = function() {\n  var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n  var /** @type {*} */ bar = a.callProperty('foo', 10, \"ten\");\n}");
     }
     
     @Test
@@ -1535,7 +1535,7 @@
                 "import custom.TestProxy; public class B {public function b() { var a:TestProxy = new TestProxy();var baz:String = a.foo + 'bar'; }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\nfoo.bar.B.prototype.b = function() {\n  var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n  var /** @type {string} */ baz = a.getProperty('foo') + 'bar';\n}");
+        assertOut("/**\n */\nfoo.bar.B.prototype.b = function() {\n  var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n  var /** @type {string} */ baz = a.getProperty('foo') + 'bar';\n}");
     }
     
     @Test
@@ -1545,7 +1545,7 @@
                 "import custom.TestProxy; public class B {public function b() { var a:TestProxy = new TestProxy();a.foo += 'bar'; }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n */\nfoo.bar.B.prototype.b = function() {\n  var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n  a.setProperty('foo', a.getProperty('foo') + 'bar');\n}");
+        assertOut("/**\n */\nfoo.bar.B.prototype.b = function() {\n  var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n  a.setProperty('foo', a.getProperty('foo') + 'bar');\n}");
     }
     
     @Test
@@ -1565,7 +1565,7 @@
                 "import custom.TestProxy; public class B {public function b() { var a:TestProxy = new TestProxy();for each (var p:String in a) var i:int = p.length; }}",
                 IForLoopNode.class, WRAP_LEVEL_PACKAGE, true);
         asBlockWalker.visitForLoop(node);
-        assertOut("var foreachiter0_target = a;\nfor (var foreachiter0 in foreachiter0_target.propertyNames()) \n{\nvar p = foreachiter0_target.getProperty(foreachiter0);\n\n  var /** @type {number} */ i = (p.length) >> 0;}\n");
+        assertOut("var foreachiter0_target = a;\nfor (var foreachiter0 in foreachiter0_target && foreachiter0_target.propertyNames()) \n{\nvar p = foreachiter0_target.getProperty(foreachiter0);\n\n  var /** @type {number} */ i = (p.length) >> 0;}\n");
     }
     
     @Test
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleGlobalConstants.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleGlobalConstants.java
index 8cc7803..71f5c6a 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleGlobalConstants.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleGlobalConstants.java
@@ -43,7 +43,7 @@
     {
         IVariableNode node = getField("var a:Number = Infinity;");
         asBlockWalker.visitVariable(node);
-        assertOut("/**\n * @type {number}\n */\nRoyaleTest_A.prototype.a = Infinity");
+        assertOut("/**\n * @package\n * @type {number}\n */\nRoyaleTest_A.prototype.a = Infinity");
     }
 
     @Override
@@ -52,7 +52,7 @@
     {
         IVariableNode node = getField("var a:Number = -Infinity;");
         asBlockWalker.visitVariable(node);
-        assertOut("/**\n * @type {number}\n */\nRoyaleTest_A.prototype.a = -Infinity");
+        assertOut("/**\n * @package\n * @type {number}\n */\nRoyaleTest_A.prototype.a = -Infinity");
     }
 
     @Override
@@ -61,7 +61,7 @@
     {
         IVariableNode node = getField("var a:Number = NaN;");
         asBlockWalker.visitVariable(node);
-        assertOut("/**\n * @type {number}\n */\nRoyaleTest_A.prototype.a = NaN");
+        assertOut("/**\n * @package\n * @type {number}\n */\nRoyaleTest_A.prototype.a = NaN");
     }
 
     @Override
@@ -70,6 +70,6 @@
     {
         IVariableNode node = getField("var a:* = undefined;");
         asBlockWalker.visitVariable(node);
-        assertOut("/**\n * @type {*}\n */\nRoyaleTest_A.prototype.a = undefined");
+        assertOut("/**\n * @package\n * @type {*}\n */\nRoyaleTest_A.prototype.a = undefined");
     }
 }
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleInterface.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleInterface.java
index 6dc1bca..3cadf61 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleInterface.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleInterface.java
@@ -40,7 +40,7 @@
     {
         IInterfaceNode node = getInterfaceNode("public interface IA{}");
         asBlockWalker.visitInterface(node);
-        assertOut("/**\n * @interface\n */\nIA = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('IA', IA);");
+        assertOut("/**\n * @interface\n */\nIA = function() {\n};");
     }
 
     @Override
@@ -49,7 +49,7 @@
     {
         IInterfaceNode node = getInterfaceNode("public interface IA extends IB{}");
         asBlockWalker.visitInterface(node);
-        assertOut("/**\n * @interface\n * @extends {IB}\n */\nIA = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('IA', IA);");
+        assertOut("/**\n * @interface\n * @extends {IB}\n */\nIA = function() {\n};");
     }
 
     @Override
@@ -58,7 +58,7 @@
     {
         IInterfaceNode node = getInterfaceNode("public interface IA extends IB, IC, ID {}");
         asBlockWalker.visitInterface(node);
-        assertOut("/**\n * @interface\n * @extends {IB}\n * @extends {IC}\n * @extends {ID}\n */\nIA = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('IA', IA);");
+        assertOut("/**\n * @interface\n * @extends {IB}\n * @extends {IC}\n * @extends {ID}\n */\nIA = function() {\n};");
     }
 
     @Override
@@ -67,7 +67,7 @@
     {
         IInterfaceNode node = getInterfaceNode("public interface IA extends foo.bar.IB, baz.goo.IC, foo.ID {}");
         asBlockWalker.visitInterface(node);
-        assertOut("/**\n * @interface\n * @extends {foo.bar.IB}\n * @extends {baz.goo.IC}\n * @extends {foo.ID}\n */\nIA = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('IA', IA);");
+        assertOut("/**\n * @interface\n * @extends {foo.bar.IB}\n * @extends {baz.goo.IC}\n * @extends {foo.ID}\n */\nIA = function() {\n};");
     }
 
 
@@ -79,7 +79,7 @@
                 + "function get foo1():Object;"
                 + "function set foo1(value:Object):void;}");
         asBlockWalker.visitInterface(node);
-        assertOut("/**\n * @interface\n */\nIA = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('IA', IA);\n/**  * @type {Object}\n */IA.prototype.foo1;");
+        assertOut("/**\n * @interface\n */\nIA = function() {\n};\n/**  * @type {Object}\n */IA.prototype.foo1;");
     }
 
     @Override
@@ -90,7 +90,7 @@
                 + "function baz1():Object;"
                 + "function baz2(value:Object):void;}");
         asBlockWalker.visitInterface(node);
-        assertOut("/**\n * @interface\n */\nIA = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('IA', IA);\n/**\n * @export\n * @return {Object}\n */\nIA.prototype.baz1 = function() {\n};\n/**\n * @export\n * @param {Object} value\n */\nIA.prototype.baz2 = function(value) {\n};");
+        assertOut("/**\n * @interface\n */\nIA = function() {\n};\n/**\n * @return {Object}\n */\nIA.prototype.baz1 = function() {\n};\n/**\n * @param {Object} value\n */\nIA.prototype.baz2 = function(value) {\n};");
     }
 
     @Override
@@ -103,7 +103,7 @@
                 + "function baz1():Object;"
                 + "function baz2(value:Object):void;}");
         asBlockWalker.visitInterface(node);
-        assertOut("/**\n * @interface\n */\nIA = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('IA', IA);\n/**  * @type {Object}\n */IA.prototype.foo1;\n/**\n * @export\n * @return {Object}\n */\nIA.prototype.baz1 = function() {\n};\n/**\n * @export\n * @param {Object} value\n */\nIA.prototype.baz2 = function(value) {\n};");
+        assertOut("/**\n * @interface\n */\nIA = function() {\n};\n/**  * @type {Object}\n */IA.prototype.foo1;\n/**\n * @return {Object}\n */\nIA.prototype.baz1 = function() {\n};\n/**\n * @param {Object} value\n */\nIA.prototype.baz2 = function(value) {\n};");
     }
 
     protected IBackend createBackend()
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleMethodMembers.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleMethodMembers.java
index b7664c2..1aff0c2 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleMethodMembers.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleMethodMembers.java
@@ -38,7 +38,7 @@
     {
         IFunctionNode node = getMethod("function foo():int{  return -1;}");
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n * @return {number}\n */\nRoyaleTest_A.prototype.foo = function() {\n  return -1;\n}");
+        assertOut("/**\n * @return {number}\n */\nRoyaleTest_A.prototype.foo = function() {\n  return -1;\n}");
     }
 
     @Override
@@ -47,7 +47,7 @@
     {
         IFunctionNode node = getMethod("function foo(bar):int{  return -1;}");
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n * @param {*} bar\n * @return {number}\n */\nRoyaleTest_A.prototype.foo = function(bar) {\n  return -1;\n}");
+        assertOut("/**\n * @param {*} bar\n * @return {number}\n */\nRoyaleTest_A.prototype.foo = function(bar) {\n  return -1;\n}");
     }
 
     @Override
@@ -56,7 +56,7 @@
     {
         IFunctionNode node = getMethod("function foo(bar:String):int{  return -1;}");
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n * @param {string} bar\n * @return {number}\n */\nRoyaleTest_A.prototype.foo = function(bar) {\n  return -1;\n}");
+        assertOut("/**\n * @param {string} bar\n * @return {number}\n */\nRoyaleTest_A.prototype.foo = function(bar) {\n  return -1;\n}");
     }
 
     @Override
@@ -65,7 +65,7 @@
     {
         IFunctionNode node = getMethod("function foo(bar:String = \"baz\"):int{  return -1;}");
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n * @param {string=} bar\n * @return {number}\n */\nRoyaleTest_A.prototype.foo = function(bar) {\n  bar = typeof bar !== 'undefined' ? bar : \"baz\";\n  return -1;\n}");
+        assertOut("/**\n * @param {string=} bar\n * @return {number}\n */\nRoyaleTest_A.prototype.foo = function(bar) {\n  bar = typeof bar !== 'undefined' ? bar : \"baz\";\n  return -1;\n}");
     }
 
     @Override
@@ -74,7 +74,7 @@
     {
         IFunctionNode node = getMethod("function foo(bar:String, baz:int = null):int{  return -1;}");
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n * @param {string} bar\n * @param {number=} baz\n * @return {number}\n */\nRoyaleTest_A.prototype.foo = function(bar, baz) {\n  baz = typeof baz !== 'undefined' ? baz : null;\n  return -1;\n}");
+        assertOut("/**\n * @param {string} bar\n * @param {number=} baz\n * @return {number}\n */\nRoyaleTest_A.prototype.foo = function(bar, baz) {\n  baz = typeof baz !== 'undefined' ? baz : null;\n  return -1;\n}");
     }
 
     @Test
@@ -82,7 +82,7 @@
     {
         IFunctionNode node = getMethodWithPackage("static const BAR:String = 'bar'; function foo(bar:String = RoyaleTest_A.BAR):int{  return -1;}");
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n * @param {string=} bar\n * @return {number}\n */\nfoo.bar.RoyaleTest_A.prototype.foo = function(bar) {\n  bar = typeof bar !== 'undefined' ? bar : foo.bar.RoyaleTest_A.BAR;\n  return -1;\n}");
+        assertOut("/**\n * @param {string=} bar\n * @return {number}\n */\nfoo.bar.RoyaleTest_A.prototype.foo = function(bar) {\n  bar = typeof bar !== 'undefined' ? bar : foo.bar.RoyaleTest_A.BAR;\n  return -1;\n}");
     }
 
     @Override
@@ -91,7 +91,7 @@
     {
         IFunctionNode node = getMethod("function foo(bar:String, ...rest):int{  return -1;}");
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n * @param {string} bar\n * @param {...} rest\n * @return {number}\n */\nRoyaleTest_A.prototype.foo = function(bar, rest) {\n  rest = Array.prototype.slice.call(arguments, 1);\n  return -1;\n}");
+        assertOut("/**\n * @param {string} bar\n * @param {...} rest\n * @return {number}\n */\nRoyaleTest_A.prototype.foo = function(bar, rest) {\n  rest = Array.prototype.slice.call(arguments, 1);\n  return -1;\n}");
     }
 
     @Override
@@ -100,7 +100,7 @@
     {
         IFunctionNode node = getMethod("import custom.custom_namespace;custom_namespace function foo(bar:String, baz:int = null):int{  return -1;}");
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n * @param {string} bar\n * @param {number=} baz\n * @return {number}\n */\nRoyaleTest_A.prototype.http_$$ns_apache_org$2017$custom$namespace__foo = function(bar, baz) {\n  baz = typeof baz !== 'undefined' ? baz : null;\n  return -1;\n}");
+        assertOut("/**\n * @param {string} bar\n * @param {number=} baz\n * @return {number}\n */\nRoyaleTest_A.prototype.http_$$ns_apache_org$2017$custom$namespace__foo = function(bar, baz) {\n  baz = typeof baz !== 'undefined' ? baz : null;\n  return -1;\n}");
     }
 
     //--------------------------------------------------------------------------
@@ -113,7 +113,7 @@
     {
         IClassNode node = (IClassNode) getNode("public function RoyaleTest_A(){this.foo();}; private function foo():String{return '';};", IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n  this.foo();\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('RoyaleTest_A', RoyaleTest_A);\n\n\n/**\n * @private\n * @return {string}\n */\nRoyaleTest_A.prototype.foo = function() {\n  return '';\n};");
+        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n  this.foo();\n};\n\n\n/**\n * @private\n * @return {string}\n */\nRoyaleTest_A.prototype.foo = function() {\n  return '';\n};");
     }
 
     @Test
@@ -121,7 +121,7 @@
     {
         IClassNode node = (IClassNode) getNode("public function RoyaleTest_A(){foo();}; private function foo():String{return '';};", IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n  this.foo();\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('RoyaleTest_A', RoyaleTest_A);\n\n\n/**\n * @private\n * @return {string}\n */\nRoyaleTest_A.prototype.foo = function() {\n  return '';\n};");
+        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n  this.foo();\n};\n\n\n/**\n * @private\n * @return {string}\n */\nRoyaleTest_A.prototype.foo = function() {\n  return '';\n};");
     }
 
     @Override
@@ -130,7 +130,7 @@
     {
         IClassNode node = (IClassNode) getNode("public function RoyaleTest_A(){}; private var baz:String; private function foo():String{return this.baz;};", IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-         assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('RoyaleTest_A', RoyaleTest_A);\n\n\n/**\n * @private\n * @type {string}\n */\nRoyaleTest_A.prototype.baz;\n\n\n/**\n * @private\n * @return {string}\n */\nRoyaleTest_A.prototype.foo = function() {\n  return this.baz;\n};");
+         assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n * @private\n * @type {string}\n */\nRoyaleTest_A.prototype.baz;\n\n\n/**\n * @private\n * @return {string}\n */\nRoyaleTest_A.prototype.foo = function() {\n  return this.baz;\n};");
     }
 
     @Test
@@ -138,7 +138,7 @@
     {
         IClassNode node = (IClassNode) getNode("public function RoyaleTest_A(){}; private var baz:String; private function foo():String{return baz;};", IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-         assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('RoyaleTest_A', RoyaleTest_A);\n\n\n/**\n * @private\n * @type {string}\n */\nRoyaleTest_A.prototype.baz;\n\n\n/**\n * @private\n * @return {string}\n */\nRoyaleTest_A.prototype.foo = function() {\n  return this.baz;\n};");
+         assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n * @private\n * @type {string}\n */\nRoyaleTest_A.prototype.baz;\n\n\n/**\n * @private\n * @return {string}\n */\nRoyaleTest_A.prototype.foo = function() {\n  return this.baz;\n};");
     }
 
     @Override
@@ -147,7 +147,7 @@
     {
         IClassNode node = (IClassNode) getNode("public function RoyaleTest_A(){}; private function foo(value:int):String{return value;}; private function bar():String{if(true){while(i){return this.foo(42);}}};", IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('RoyaleTest_A', RoyaleTest_A);\n\n\n/**\n * @private\n * @param {number} value\n * @return {string}\n */\nRoyaleTest_A.prototype.foo = function(value) {\n  return org.apache.royale.utils.Language.string(value);\n};\n\n\n/**\n * @private\n * @return {string}\n */\nRoyaleTest_A.prototype.bar = function() {\n  if (true) {\n    while (i) {\n      return this.foo(42);\n    }\n  }\n};");
+        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n * @private\n * @param {number} value\n * @return {string}\n */\nRoyaleTest_A.prototype.foo = function(value) {\n  return org.apache.royale.utils.Language.string(value);\n};\n\n\n/**\n * @private\n * @return {string}\n */\nRoyaleTest_A.prototype.bar = function() {\n  if (true) {\n    while (i) {\n      return this.foo(42);\n    }\n  }\n};");
     }
 
     @Test
@@ -155,7 +155,7 @@
     {
         IClassNode node = (IClassNode) getNode("public function RoyaleTest_A(){}; private function foo(value:int):String{return value;}; private function bar():void{if(true){while(i){foo(42);}}};", IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('RoyaleTest_A', RoyaleTest_A);\n\n\n/**\n * @private\n * @param {number} value\n * @return {string}\n */\nRoyaleTest_A.prototype.foo = function(value) {\n  return org.apache.royale.utils.Language.string(value);\n};\n\n\n/**\n * @private\n */\nRoyaleTest_A.prototype.bar = function() {\n  if (true) {\n    while (i) {\n      this.foo(42);\n    }\n  }\n};");
+        assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n * @private\n * @param {number} value\n * @return {string}\n */\nRoyaleTest_A.prototype.foo = function(value) {\n  return org.apache.royale.utils.Language.string(value);\n};\n\n\n/**\n * @private\n */\nRoyaleTest_A.prototype.bar = function() {\n  if (true) {\n    while (i) {\n      this.foo(42);\n    }\n  }\n};");
     }
 
     @Override
@@ -165,7 +165,7 @@
         IFunctionNode node = getMethod("public function foo(bar:String, baz:int = null):int{  return -1;}");
         asBlockWalker.visitFunction(node);
         // we ignore the 'public' namespace completely
-        assertOut("/**\n * @export\n * @param {string} bar\n * @param {number=} baz\n * @return {number}\n */\nRoyaleTest_A.prototype.foo = function(bar, baz) {\n  baz = typeof baz !== 'undefined' ? baz : null;\n  return -1;\n}");
+        assertOut("/**\n * @param {string} bar\n * @param {number=} baz\n * @return {number}\n */\nRoyaleTest_A.prototype.foo = function(bar, baz) {\n  baz = typeof baz !== 'undefined' ? baz : null;\n  return -1;\n}");
     }
 
     @Override
@@ -177,7 +177,7 @@
         // (erikdebruin) here we actually DO want to declare the method
         //               directly on the 'class' constructor instead of the
         //               prototype!
-        assertOut("/**\n * @export\n * @param {string} bar\n * @param {number=} baz\n * @return {number}\n */\nRoyaleTest_A.foo = function(bar, baz) {\n  baz = typeof baz !== 'undefined' ? baz : null;\n  return -1;\n}");
+        assertOut("/**\n * @param {string} bar\n * @param {number=} baz\n * @return {number}\n */\nRoyaleTest_A.foo = function(bar, baz) {\n  baz = typeof baz !== 'undefined' ? baz : null;\n  return -1;\n}");
     }
 
     @Override
@@ -186,7 +186,7 @@
     {
         IFunctionNode node = getMethod("public override function foo(bar:String, baz:int = null):int{  return -1;}");
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n * @override\n */\nRoyaleTest_A.prototype.foo = function(bar, baz) {\n  baz = typeof baz !== 'undefined' ? baz : null;\n  return -1;\n}");
+        assertOut("/**\n * @override\n */\nRoyaleTest_A.prototype.foo = function(bar, baz) {\n  baz = typeof baz !== 'undefined' ? baz : null;\n  return -1;\n}");
     }
 
     @Override
@@ -195,7 +195,7 @@
     {
         IFunctionNode node = getMethod("override public function foo(bar:String, baz:int = null):int{return -1;}");
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n * @override\n */\nRoyaleTest_A.prototype.foo = function(bar, baz) {\n  baz = typeof baz !== 'undefined' ? baz : null;\n  return -1;\n}");
+        assertOut("/**\n * @override\n */\nRoyaleTest_A.prototype.foo = function(bar, baz) {\n  baz = typeof baz !== 'undefined' ? baz : null;\n  return -1;\n}");
     }
 
     @Test
@@ -203,7 +203,7 @@
     {
         IFunctionNode node = getMethod("public function foo():String{const A:String = 'Hello World'; return A;}");
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @export\n * @return {string}\n */\nRoyaleTest_A.prototype.foo = function() {\n  \n/**\n * @const\n * @type {string}\n */\nvar A = 'Hello World';\n  return A;\n}");
+        assertOut("/**\n * @return {string}\n */\nRoyaleTest_A.prototype.foo = function() {\n  \n/**\n * @const\n * @type {string}\n */\nvar A = 'Hello World';\n  return A;\n}");
     }
 
     @Test
@@ -211,7 +211,7 @@
     {
         IClassNode node = (IClassNode) getNode("public abstract class A { public abstract function a(arg1:String):Object; }", IClassNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\nA = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('A', A);\n\n\n/**\n * @export\n * @param {string} arg1\n * @return {Object}\n */\nA.prototype.a = function(arg1) {\n};");
+        assertOut("/**\n * @constructor\n */\nA = function() {\n};\n\n\n/**\n * @param {string} arg1\n * @return {Object}\n */\nA.prototype.a = function(arg1) {\n};");
     }
 
     @Override
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 6e9ebc5..8b9af2f 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
@@ -82,7 +82,7 @@
         		" * @constructor\n" +
         		" */\n" +
         		"A = function() {\n" +
-        		"};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('A', A);\n" +
+        		"};\n" +
         		"\n" +
         		"\n" +
         		"/**\n" +
@@ -131,7 +131,7 @@
         		" * @constructor\n" +
         		" */\n" +
         		"foo.bar.baz.A = function() {\n" +
-        		"};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('foo.bar.baz.A', foo.bar.baz.A);\n" +
+        		"};\n" +
         		"\n" +
         		"\n" +
         		"/**\n" +
@@ -184,12 +184,6 @@
 				"\n" +
 				"\n" +
 				"/**\n" +
-				" * Prevent renaming of class. Needed for reflection.\n" +
-				" */\n" +
-				"goog.exportSymbol('foo.bar.baz.A', foo.bar.baz.A);\n" +
-				"\n" +
-				"\n" +
-				"/**\n" +
 				" * Metadata\n" +
 				" *\n" +
 				" * @type {Object.<string, Array.<Object>>}\n" +
@@ -252,12 +246,6 @@
 				"\n" +
 				"\n" +
 				"/**\n" +
-				" * Prevent renaming of class. Needed for reflection.\n" +
-				" */\n" +
-				"goog.exportSymbol('foo.bar.baz.A', foo.bar.baz.A);\n" +
-				"\n" +
-				"\n" +
-				"/**\n" +
 				" * Metadata\n" +
 				" *\n" +
 				" * @type {Object.<string, Array.<Object>>}\n" +
@@ -312,12 +300,6 @@
 				"\n" +
 				"\n" +
 				"/**\n" +
-				" * Prevent renaming of class. Needed for reflection.\n" +
-				" */\n" +
-				"goog.exportSymbol('foo.bar.baz.A', foo.bar.baz.A);\n" +
-				"\n" +
-				"\n" +
-				"/**\n" +
 				" * Metadata\n" +
 				" *\n" +
 				" * @type {Object.<string, Array.<Object>>}\n" +
@@ -373,13 +355,6 @@
 				"\n" +
 				"\n" +
 				"/**\n" +
-				" * Prevent renaming of class. Needed for reflection.\n" +
-				" */\n" +
-				"goog.exportSymbol('foo.bar.baz.A', foo.bar.baz.A);\n" +
-				"\n" +
-				"\n" +
-				"/**\n" +
-				" * @export\n" +
 				" */\n" +
 				"foo.bar.baz.A.prototype.foo = function() {\n" +
 				"};\n" +
@@ -452,12 +427,6 @@
 				"\n" +
 				"\n" +
 				"/**\n" +
-				" * Prevent renaming of class. Needed for reflection.\n" +
-				" */\n" +
-				"goog.exportSymbol('foo.bar.baz.A', foo.bar.baz.A);\n" +
-				"\n" +
-				"\n" +
-				"/**\n" +
 				" * Metadata\n" +
 				" *\n" +
 				" * @type {Object.<string, Array.<Object>>}\n" +
@@ -496,12 +465,6 @@
 				"\n" +
 				"\n" +
 				"/**\n" +
-				" * Prevent renaming of class. Needed for reflection.\n" +
-				" */\n" +
-				"goog.exportSymbol('foo.bar.baz.A.InternalClass', foo.bar.baz.A.InternalClass);\n" +
-				"\n" +
-				"\n" +
-				"/**\n" +
 				" * Metadata\n" +
 				" *\n" +
 				" * @type {Object.<string, Array.<Object>>}\n" +
@@ -564,12 +527,6 @@
 				"\n" +
 				"\n" +
 				"/**\n" +
-				" * Prevent renaming of class. Needed for reflection.\n" +
-				" */\n" +
-				"goog.exportSymbol('foo.bar.baz.A', foo.bar.baz.A);\n" +
-				"\n" +
-				"\n" +
-				"/**\n" +
 				" * Metadata\n" +
 				" *\n" +
 				" * @type {Object.<string, Array.<Object>>}\n" +
@@ -636,12 +593,6 @@
 				"\n" +
 				"\n" +
 				"/**\n" +
-				" * Prevent renaming of class. Needed for reflection.\n" +
-				" */\n" +
-				"goog.exportSymbol('foo.bar.baz.A', foo.bar.baz.A);\n" +
-				"\n" +
-				"\n" +
-				"/**\n" +
 				" * Metadata\n" +
 				" *\n" +
 				" * @type {Object.<string, Array.<Object>>}\n" +
@@ -673,7 +624,7 @@
 				"\n" +
 				"\n" +
 				"/**\n" +
-				//" * @export\n" +
+				" * @package\n" +
 				" * @type {number}\n" +
 				" */\n" +
 				"foo.bar.baz.A.internalVar = 2"
@@ -724,12 +675,6 @@
 				"\n" +
 				"\n" +
 				"/**\n" +
-				" * Prevent renaming of class. Needed for reflection.\n" +
-				" */\n" +
-				"goog.exportSymbol('foo.bar.baz.A', foo.bar.baz.A);\n" +
-				"\n" +
-				"\n" +
-				"/**\n" +
 				" * Metadata\n" +
 				" *\n" +
 				" * @type {Object.<string, Array.<Object>>}\n" +
@@ -768,13 +713,6 @@
 				"\n" +
 				"\n" +
 				"/**\n" +
-				" * Prevent renaming of class. Needed for reflection.\n" +
-				" */\n" +
-				"goog.exportSymbol('foo.bar.baz.A.InternalClass', foo.bar.baz.A.InternalClass);\n" +
-				"\n" +
-				"\n" +
-				"/**\n" +
-				" * @export\n" +
 				" * @nocollapse\n" +
 				" * @type {string}\n" +
 				" */\n" +
@@ -782,7 +720,7 @@
 				"\n" +
 				"\n" +
 				"/**\n" +
-				" * @export\n" +
+				" * @nocollapse\n" + 
 				" * @return {string}\n" +
 				" */\n" +
 				"foo.bar.baz.A.InternalClass.someStaticFunction = function() {\n" +
@@ -791,7 +729,6 @@
 				"\n" +
 				"\n" +
 				"/**\n" +
-				" * @export\n" +
 				" * @return {string}\n" +
 				" */\n" +
 				"foo.bar.baz.A.InternalClass.prototype.someMethod = function() {\n" +
@@ -891,9 +828,11 @@
 				"\n" +
 				"\n" +
 				"/**\n" +
-				" * Prevent renaming of class. Needed for reflection.\n" +
+				" * @nocollapse\n" +
+				" * @export\n" +
+				" * @type {string}\n" +
 				" */\n" +
-				"goog.exportSymbol('foo.bar.baz.A', foo.bar.baz.A);\n" +
+				"foo.bar.baz.A.prototype.myString;\n" +
 				"\n" +
 				"\n" +
 				"foo.bar.baz.A.prototype.get__myString = function() {\n" +
@@ -907,8 +846,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" +
@@ -959,9 +898,11 @@
 				"\n" +
 				"\n" +
 				"/**\n" +
-				" * Prevent renaming of class. Needed for reflection.\n" +
+				" * @nocollapse\n" +
+				" * @export\n" +
+				" * @type {string}\n" +
 				" */\n" +
-				"goog.exportSymbol('foo.bar.baz.A.InternalClass', foo.bar.baz.A.InternalClass);\n" +
+				"foo.bar.baz.A.InternalClass.prototype.someString;\n" +
 				"\n" +
 				"\n" +
 				"foo.bar.baz.A.InternalClass.prototype.get__someString = function() {\n" +
@@ -975,8 +916,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" +
@@ -1062,12 +1003,6 @@
 				"\n" +
 				"\n" +
 				"/**\n" +
-				" * Prevent renaming of class. Needed for reflection.\n" +
-				" */\n" +
-				"goog.exportSymbol('foo.bar.baz.A', foo.bar.baz.A);\n" +
-				"\n" +
-				"\n" +
-				"/**\n" +
 				" * Metadata\n" +
 				" *\n" +
 				" * @type {Object.<string, Array.<Object>>}\n" +
@@ -1103,12 +1038,6 @@
 				" */\n" +
 				"foo.bar.baz.A.ITestInterface = function() {\n" +
 				"};\n" +
-				"\n" +
-				"\n" +
-				"/**\n" +
-				" * Prevent renaming of class. Needed for reflection.\n" +
-				" */\n" +
-				"goog.exportSymbol('foo.bar.baz.A.ITestInterface', foo.bar.baz.A.ITestInterface);\n" +
 				"foo.bar.baz.A.ITestInterface.prototype.test = function() {\n" +
 				"};\n" +
 				"\n" +
@@ -1153,13 +1082,6 @@
 				"\n" +
 				"\n" +
 				"/**\n" +
-				" * Prevent renaming of class. Needed for reflection.\n" +
-				" */\n" +
-				"goog.exportSymbol('foo.bar.baz.A.InternalClass', foo.bar.baz.A.InternalClass);\n" +
-				"\n" +
-				"\n" +
-				"/**\n" +
-				" * @export\n" +
 				" */\n" +
 				"foo.bar.baz.A.InternalClass.prototype.test = function() {\n" +
 				"};\n" +
@@ -1224,7 +1146,6 @@
 				"\n" +
 				"\n" +
 				"/**\n" +
-				" * @export\n" +
 				" * @return {number}\n" +
 				" */\n" +
 				"foo.bar.A = function() {\n" +
@@ -1240,13 +1161,6 @@
 				"\n" +
 				"\n" +
 				"/**\n" +
-				" * Prevent renaming of class. Needed for reflection.\n" +
-				" */\n" +
-				"goog.exportSymbol('foo.bar.A.Internal', foo.bar.A.Internal);\n" +
-				"\n" +
-				"\n" +
-				"/**\n" +
-				" * @export\n" +
 				" * @nocollapse\n" +
 				" * @const\n" +
 				" * @type {number}\n" +
@@ -1290,7 +1204,7 @@
 	{
 		IFileNode node = compileAS("package {public function A(){}}");
 		asBlockWalker.visitFile(node);
-		assertOutWithMetadata("/**\n * A\n *\n * @fileoverview\n *\n * @suppress {checkTypes|accessControls}\n */\n\ngoog.provide('A');\n\n\n\n/**\n * @export\n */\nA = function() {\n}");
+		assertOutWithMetadata("/**\n * A\n *\n * @fileoverview\n *\n * @suppress {checkTypes|accessControls}\n */\n\ngoog.provide('A');\n\n\n\n/**\n */\nA = function() {\n}");
 	}
 
 	@Test
@@ -1298,7 +1212,7 @@
 	{
 		IFileNode node = compileAS("package foo.bar.baz {public function A(){}}");
 		asBlockWalker.visitFile(node);
-		assertOutWithMetadata("/**\n * foo.bar.baz.A\n *\n * @fileoverview\n *\n * @suppress {checkTypes|accessControls}\n */\n\ngoog.provide('foo.bar.baz.A');\n\n\n\n/**\n * @export\n */\nfoo.bar.baz.A = function() {\n}");
+		assertOutWithMetadata("/**\n * foo.bar.baz.A\n *\n * @fileoverview\n *\n * @suppress {checkTypes|accessControls}\n */\n\ngoog.provide('foo.bar.baz.A');\n\n\n\n/**\n */\nfoo.bar.baz.A = function() {\n}");
 	}
 
 	@Test
@@ -1306,7 +1220,7 @@
 	{
 		IFileNode node = compileAS("package {public var A:String = \"Hello\";}");
 		asBlockWalker.visitFile(node);
-		assertOutWithMetadata("/**\n * A\n *\n * @fileoverview\n *\n * @suppress {checkTypes|accessControls}\n */\n\ngoog.provide('A');\n\n\n\n/**\n * @export\n * @type {string}\n */\nA = \"Hello\"");
+		assertOutWithMetadata("/**\n * A\n *\n * @fileoverview\n *\n * @suppress {checkTypes|accessControls}\n */\n\ngoog.provide('A');\n\n\n\n/**\n * @type {string}\n */\nA = \"Hello\"");
 	}
 
 	@Test
@@ -1314,7 +1228,7 @@
 	{
 		IFileNode node = compileAS("package foo.bar.baz {public var A:String = \"Hello\";}");
 		asBlockWalker.visitFile(node);
-		assertOutWithMetadata("/**\n * foo.bar.baz.A\n *\n * @fileoverview\n *\n * @suppress {checkTypes|accessControls}\n */\n\ngoog.provide('foo.bar.baz.A');\n\n\n\n/**\n * @export\n * @type {string}\n */\nfoo.bar.baz.A = \"Hello\"");
+		assertOutWithMetadata("/**\n * foo.bar.baz.A\n *\n * @fileoverview\n *\n * @suppress {checkTypes|accessControls}\n */\n\ngoog.provide('foo.bar.baz.A');\n\n\n\n/**\n * @type {string}\n */\nfoo.bar.baz.A = \"Hello\"");
 	}
     
     @Override
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleStatements.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleStatements.java
index 50ab0e0..00648d5 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleStatements.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleStatements.java
@@ -270,6 +270,15 @@
         assertOut("var /** @type {number} */ a = this.b.getFullYear()");
     }
 
+    @Test
+    public void testVarDeclaration_withTypeNumberAndAssignedDatePropertyWithRequiredParentheses()
+    {
+        IVariableNode node = (IVariableNode) getNode("function royaleTest_a():Object { var a:Number = (b.fullYear + 1) / 2; }var b:Date;",
+            IVariableNode.class, WRAP_LEVEL_CLASS);
+        asBlockWalker.visitVariable(node);
+        assertOut("var /** @type {number} */ a = (this.b.getFullYear() + 1) / 2");
+    }
+
     //----------------------------------
     // const declaration
     //----------------------------------
@@ -718,7 +727,7 @@
         		              " * @constructor\n" +
         		              " */\n" +
         		              "RoyaleTest_A = function() {\n" +
-        		              "};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('RoyaleTest_A', RoyaleTest_A);\n\n\n" +
+        		              "};\n\n\n" +
         		              "RoyaleTest_A.prototype.royaleTest_a = function() {\n" +
                               "  var self = this;\n" +
                               "  var /** @type {number} */ len = 0;\n" +
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/sourcemaps/TestSourceMapFieldMembers.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/sourcemaps/TestSourceMapFieldMembers.java
index 503923c..219f6f6 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/sourcemaps/TestSourceMapFieldMembers.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/sourcemaps/TestSourceMapFieldMembers.java
@@ -32,8 +32,8 @@
     {
         IVariableNode node = getField("var foo;");
         asBlockWalker.visitVariable(node);
-        ///**\n * @type {*}\n */\nRoyaleTest_A.prototype.foo
-        assertMapping(node, 0, 4, 3, 0, 3, 26);  // foo
+        ///**\n * @package\n * @type {*}\n */\nRoyaleTest_A.prototype.foo
+        assertMapping(node, 0, 4, 4, 0, 4, 26);  // foo
     }
 
     @Test
@@ -41,10 +41,10 @@
     {
         IVariableNode node = getField("var foo:String = null;");
         asBlockWalker.visitVariable(node);
-        //**\n * @type {string}\n */\nRoyaleTest_A.prototype.foo = null
-        assertMapping(node, 0, 4, 3, 0, 3, 26);  // foo
-        assertMapping(node, 0, 14, 3, 26, 3, 29);  // =
-        assertMapping(node, 0, 17, 3, 29, 3, 33);  // null
+        //**\n * @package\n * @type {string}\n */\nRoyaleTest_A.prototype.foo = null
+        assertMapping(node, 0, 4, 4, 0, 4, 26);  // foo
+        assertMapping(node, 0, 14, 4, 26, 4, 29);  // =
+        assertMapping(node, 0, 17, 4, 29, 4, 33);  // null
     }
 
     @Test
@@ -52,8 +52,8 @@
     {
         IVariableNode node = getField("var foo:int;");
         asBlockWalker.visitVariable(node);
-        ///**\n * @type {number}\n */\nRoyaleTest_A.prototype.foo = 0
-        assertMapping(node, 0, 4, 3, 0, 3, 26);  // foo
+        ///**\n * @package\n * @type {number}\n */\nRoyaleTest_A.prototype.foo = 0
+        assertMapping(node, 0, 4, 4, 0, 4, 26);  // foo
     }
 
     @Test
@@ -61,10 +61,10 @@
     {
         IVariableNode node = getField("var foo = 420;");
         asBlockWalker.visitVariable(node);
-        ///**\n * @type {*}\n */\nRoyaleTest_A.prototype.foo = 420
-        assertMapping(node, 0, 4, 3, 0, 3, 26);  // foo
-        assertMapping(node, 0, 7, 3, 26, 3, 29);  // =
-        assertMapping(node, 0, 10, 3, 29, 3, 32);  // 420
+        ///**\n * @package\n * @type {*}\n */\nRoyaleTest_A.prototype.foo = 420
+        assertMapping(node, 0, 4, 4, 0, 4, 26);  // foo
+        assertMapping(node, 0, 7, 4, 26, 4, 29);  // =
+        assertMapping(node, 0, 10, 4, 29, 4, 32);  // 420
     }
 
     @Test
@@ -72,10 +72,10 @@
     {
         IVariableNode node = getField("var foo:int = 420;");
         asBlockWalker.visitVariable(node);
-        ///**\n * @type {number}\n */\nRoyaleTest_A.prototype.foo = 420
-        assertMapping(node, 0, 4, 3, 0, 3, 26);  // foo
-        assertMapping(node, 0, 11, 3, 26, 3, 29);  // =
-        assertMapping(node, 0, 14, 3, 29, 3, 32);  // 420
+        ///**\n * @package\n * @type {number}\n */\nRoyaleTest_A.prototype.foo = 420
+        assertMapping(node, 0, 4, 4, 0, 4, 26);  // foo
+        assertMapping(node, 0, 11, 4, 26, 4, 29);  // =
+        assertMapping(node, 0, 14, 4, 29, 4, 32);  // 420
     }
 
     @Test
@@ -83,8 +83,8 @@
     {
         IVariableNode node = getField("static var foo;");
         asBlockWalker.visitVariable(node);
-        ////**\n * @type {*}\n */\nRoyaleTest_A.foo
-        assertMapping(node, 0, 11, 3, 0, 3, 16);  // foo
+        ////**\n * @package\n * @type {*}\n */\nRoyaleTest_A.foo
+        assertMapping(node, 0, 11, 4, 0, 4, 16);  // foo
     }
 
     @Test
@@ -92,8 +92,8 @@
     {
         IVariableNode node = getField("static var foo:int;");
         asBlockWalker.visitVariable(node);
-        ///**\n * @type {number}\n */\nRoyaleTest_A.foo = 0
-        assertMapping(node, 0, 11, 3, 0, 3, 16);  // foo
+        ///**\n * @package\n * @type {number}\n */\nRoyaleTest_A.foo = 0
+        assertMapping(node, 0, 11, 4, 0, 4, 16);  // foo
     }
 
     @Test
@@ -101,10 +101,10 @@
     {
         IVariableNode node = getField("static var foo = 420;");
         asBlockWalker.visitVariable(node);
-        ///**\n * @type {*}\n */\nRoyaleTest_A.foo = 420
-        assertMapping(node, 0, 11, 3, 0, 3, 16);   // foo
-        assertMapping(node, 0, 14, 3, 16, 3, 19);  // =
-        assertMapping(node, 0, 17, 3, 19, 3, 22);  // 420
+        ///**\n * @package\n * @type {*}\n */\nRoyaleTest_A.foo = 420
+        assertMapping(node, 0, 11, 4, 0, 4, 16);   // foo
+        assertMapping(node, 0, 14, 4, 16, 4, 19);  // =
+        assertMapping(node, 0, 17, 4, 19, 4, 22);  // 420
     }
 
     @Test
@@ -112,10 +112,10 @@
     {
         IVariableNode node = getField("static var foo:int = 420;");
         asBlockWalker.visitVariable(node);
-        ///**\n * @type {number}\n */\nRoyaleTest_A.foo = 420
-        assertMapping(node, 0, 11, 3, 0, 3, 16);  // foo
-        assertMapping(node, 0, 18, 3, 16, 3, 19);  // =
-        assertMapping(node, 0, 21, 3, 19, 3, 22);  // 420
+        ///**\n * @package\n * @type {number}\n */\nRoyaleTest_A.foo = 420
+        assertMapping(node, 0, 11, 4, 0, 4, 16);  // foo
+        assertMapping(node, 0, 18, 4, 16, 4, 19);  // =
+        assertMapping(node, 0, 21, 4, 19, 4, 22);  // 420
     }
 
     @Test
@@ -123,8 +123,8 @@
     {
         IVariableNode node = getField("const foo;");
         asBlockWalker.visitVariable(node);
-        ///**\n * @const\n * @type {*}\n */\nRoyaleTest_A.prototype.foo
-        assertMapping(node, 0, 6, 4, 0, 4, 26);  // foo
+        ///**\n * @package\n * @const\n * @type {*}\n */\nRoyaleTest_A.prototype.foo
+        assertMapping(node, 0, 6, 5, 0, 5, 26);  // foo
     }
 
     @Test
@@ -132,8 +132,8 @@
     {
         IVariableNode node = getField("const foo:int;");
         asBlockWalker.visitVariable(node);
-        ///**\n * @const\n * @type {number}\n */\nRoyaleTest_A.prototype.foo = 0
-        assertMapping(node, 0, 6, 4, 0, 4, 26);  // foo
+        ///**\n * @package\n * @const\n * @type {number}\n */\nRoyaleTest_A.prototype.foo = 0
+        assertMapping(node, 0, 6, 5, 0, 5, 26);  // foo
     }
 
     @Test
@@ -141,10 +141,10 @@
     {
         IVariableNode node = getField("const foo = 420;");
         asBlockWalker.visitVariable(node);
-        ///**\n * @const\n * @type {*}\n */\nRoyaleTest_A.prototype.foo = 420
-        assertMapping(node, 0, 6, 4, 0, 4, 26);  // foo
-        assertMapping(node, 0, 9, 4, 26, 4, 29);  // =
-        assertMapping(node, 0, 12, 4, 29, 4, 32);  // 420
+        ///**\n * @package\n * @const\n * @type {*}\n */\nRoyaleTest_A.prototype.foo = 420
+        assertMapping(node, 0, 6, 5, 0, 5, 26);  // foo
+        assertMapping(node, 0, 9, 5, 26, 5, 29);  // =
+        assertMapping(node, 0, 12, 5, 29, 5, 32);  // 420
     }
 
     @Test
@@ -152,10 +152,10 @@
     {
         IVariableNode node = getField("const foo:int = 420;");
         asBlockWalker.visitVariable(node);
-        ///**\n * @const\n * @type {number}\n */\nRoyaleTest_A.prototype.foo = 420
-        assertMapping(node, 0, 6, 4, 0, 4, 26);  // foo
-        assertMapping(node, 0, 13, 4, 26, 4, 29);  // =
-        assertMapping(node, 0, 16, 4, 29, 4, 32);  // 420
+        ///**\n * @package\n * @const\n * @type {number}\n */\nRoyaleTest_A.prototype.foo = 420
+        assertMapping(node, 0, 6, 5, 0, 5, 26);  // foo
+        assertMapping(node, 0, 13, 5, 26, 5, 29);  // =
+        assertMapping(node, 0, 16, 5, 29, 5, 32);  // 420
     }
 
     @Test
@@ -163,8 +163,8 @@
     {
         IVariableNode node = getField("static const foo;");
         asBlockWalker.visitVariable(node);
-        ///**\n * @const\n * @type {*}\n */\nRoyaleTest_A.foo
-        assertMapping(node, 0, 13, 4, 0, 4, 16);  // foo
+        ///**\n * @package\n * @const\n * @type {*}\n */\nRoyaleTest_A.foo
+        assertMapping(node, 0, 13, 5, 0, 5, 16);  // foo
     }
 
     @Test
@@ -172,8 +172,8 @@
     {
         IVariableNode node = getField("static const foo:int;");
         asBlockWalker.visitVariable(node);
-        ///**\n * @const\n * @type {number}\n */\nRoyaleTest_A.foo = 0
-        assertMapping(node, 0, 13, 4, 0, 4, 16);  // foo
+        ///**\n * @package\n * @const\n * @type {number}\n */\nRoyaleTest_A.foo = 0
+        assertMapping(node, 0, 13, 5, 0, 5, 16);  // foo
     }
 
     @Test
@@ -181,10 +181,10 @@
     {
         IVariableNode node = getField("static const foo = 420;");
         asBlockWalker.visitVariable(node);
-        ///**\n * @const\n * @type {*}\n */\nRoyaleTest_A.foo = 420
-        assertMapping(node, 0, 13, 4, 0, 4, 16);  // foo
-        assertMapping(node, 0, 16, 4, 16, 4, 19);  // =
-        assertMapping(node, 0, 19, 4, 19, 4, 22);  // 420
+        ///**\n * @package\n * @const\n * @type {*}\n */\nRoyaleTest_A.foo = 420
+        assertMapping(node, 0, 13, 5, 0, 5, 16);  // foo
+        assertMapping(node, 0, 16, 5, 16, 5, 19);  // =
+        assertMapping(node, 0, 19, 5, 19, 5, 22);  // 420
     }
 
     @Test
@@ -192,10 +192,10 @@
     {
         IVariableNode node = getField("static const foo:int = 420;");
         asBlockWalker.visitVariable(node);
-        ///**\n * @export\n * @const\n * @type {number}\n */\nRoyaleTest_A.foo = 420
-        assertMapping(node, 0, 13, 4, 0, 4, 16);  // foo
-        assertMapping(node, 0, 20, 4, 16, 4, 19);  // =
-        assertMapping(node, 0, 23, 4, 19, 4, 22);  // 420
+        ///**\n * @package\n * @const\n * @type {number}\n */\nRoyaleTest_A.foo = 420
+        assertMapping(node, 0, 13, 5, 0, 5, 16);  // foo
+        assertMapping(node, 0, 20, 5, 16, 5, 19);  // =
+        assertMapping(node, 0, 23, 5, 19, 5, 22);  // 420
     }
 
     protected IBackend createBackend()
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/sourcemaps/TestSourceMapGlobalClasses.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/sourcemaps/TestSourceMapGlobalClasses.java
index f04d569..319ebdb 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/sourcemaps/TestSourceMapGlobalClasses.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/sourcemaps/TestSourceMapGlobalClasses.java
@@ -51,8 +51,8 @@
     {
         IVariableNode node = getVariable("var a:Number = int.MAX_VALUE");
         asBlockWalker.visitVariable(node);
-        //var /** @type {number} */ a = 2147483648
-        assertMapping(node, 0, 15, 0, 30, 0, 40);    // 2147483648
+        //var /** @type {number} */ a = 2147483647
+        assertMapping(node, 0, 15, 0, 30, 0, 40);    // 2147483647
     }
 
     @Test
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/mxml/royale/TestRoyaleMXMLApplication.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/mxml/royale/TestRoyaleMXMLApplication.java
index 0a806bf..b88bb01 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/mxml/royale/TestRoyaleMXMLApplication.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/mxml/royale/TestRoyaleMXMLApplication.java
@@ -160,7 +160,7 @@
         		"   * @private\n" +
         		"   * @type {org.apache.royale.html.accessories.TextPromptBead}\n" +
         		"   */\n" +
-        		"  this.$ID0_;\n" +
+        		"  this.$ID_8_0;\n" +
         		"  \n" +
         		"  /**\n" +
         		"   * @private\n" +
@@ -183,7 +183,7 @@
         		"      2,\n" +
         		"      '_id',\n" +
         		"      true,\n" +
-        		"      '$ID0',\n" +
+        		"      '$ID_8_0',\n" +
         		"      'prompt',\n" +
         		"      true,\n" +
         		"      '0-9\\\\',\n" +
@@ -199,11 +199,6 @@
         		"goog.inherits(AppName, org.apache.royale.core.Application);\n" +
           		"\n" +
         		"\n" +
-        		"/**\n" +
-        		" * Prevent renaming of class. Needed for reflection.\n" +
-        		" */\n" +
-        		"goog.exportSymbol('AppName', AppName);\n" +
-        		"\n" +
         		"\n" +
 				"\n" +
         		"/**\n" +
@@ -278,7 +273,7 @@
         		"   * @private\n" +
         		"   * @type {org.apache.royale.html.accessories.TextPromptBead}\n" +
         		"   */\n" +
-        		"  this.$ID0_;\n" +
+        		"  this.$ID_8_0;\n" +
         		"  \n" +
         		"  /**\n" +
         		"   * @private\n" +
@@ -301,7 +296,7 @@
         		"      2,\n" +
         		"      '_id',\n" +
         		"      true,\n" +
-        		"      '$ID0',\n" +
+        		"      '$ID_8_0',\n" +
         		"      'prompt',\n" +
         		"      true,\n" +
         		"      '0-9\\\\',\n" +
@@ -317,11 +312,6 @@
         		"goog.inherits(AppName, org.apache.royale.core.Application);\n" +
           		"\n" +
         		"\n" +
-        		"/**\n" +
-        		" * Prevent renaming of class. Needed for reflection.\n" +
-        		" */\n" +
-        		"goog.exportSymbol('AppName', AppName);\n" +
-        		"\n" +
         		"\n" +
 				"\n" +
         		"/**\n" +
@@ -410,11 +400,6 @@
         		"goog.inherits(AppName, org.apache.royale.core.Application);\n" +
           		"\n" +
         		"\n" +
-        		"/**\n" +
-        		" * Prevent renaming of class. Needed for reflection.\n" +
-        		" */\n" +
-        		"goog.exportSymbol('AppName', AppName);\n" +
-        		"\n" +
         		"\n" +
 				"\n" +
         		"/**\n" +
@@ -504,15 +489,10 @@
         		"  this.mxmldp;\n" +
         		"};\n" +
         		"goog.inherits(AppName, org.apache.royale.core.Application);\n" +
-          		"\n" +
-        		"\n" +
-        		"/**\n" +
-        		" * Prevent renaming of class. Needed for reflection.\n" +
-        		" */\n" +
-        		"goog.exportSymbol('AppName', AppName);\n" +
         		"\n" +
         		"\n" +
 				"\n" +
+				"\n" +
         		"/**\n" +
         		" * Metadata\n" +
         		" *\n" +
@@ -589,13 +569,13 @@
         		"   * @private\n" +
         		"   * @type {org.apache.royale.core.View}\n" +
         		"   */\n" +
-        		"  this.$ID1_;\n" +
+        		"  this.$ID_8_1;\n" +
         		"  \n" +
         		"  /**\n" +
         		"   * @private\n" +
         		"   * @type {org.apache.royale.html.Label}\n" +
         		"   */\n" +
-        		"  this.$ID0_;\n" +
+        		"  this.$ID_8_0;\n" +
         		"  \n" +
         		"  /**\n" +
         		"   * @private\n" +
@@ -618,7 +598,7 @@
 				"      1,\n" +
 				"      '_id',\n" +
 				"      true,\n" +
-				"      '$ID1',\n" +
+				"      '$ID_8_1',\n" +
 				"      0,\n" +
 				"      0,\n" +
 				"      [\n" +
@@ -626,7 +606,7 @@
 				"        1,\n" +
 				"        '_id',\n" +
 				"        true,\n" +
-				"        '$ID0',\n" + 
+				"        '$ID_8_0',\n" + 
 				"        0,\n" +
 				"        0,\n" +
 				"        null\n" +
@@ -640,11 +620,6 @@
         		"goog.inherits(AppName, org.apache.royale.core.Application);\n" +
           		"\n" +
         		"\n" +
-        		"/**\n" +
-        		" * Prevent renaming of class. Needed for reflection.\n" +
-        		" */\n" +
-        		"goog.exportSymbol('AppName', AppName);\n" +
-        		"\n" +
         		"\n" +
 				"\n" +
         		"/**\n" +
@@ -654,7 +629,7 @@
         		"1,\n" +
         		"[\"org.apache.royale.net.HTTPConstants\", \"GET\"],\n" +
         		"null,\n" +
-        		"[\"$ID0\", \"text\"]\n" +
+        		"[\"$ID_8_0\", \"text\"]\n" +
         		"];\n" +
         		"/**\n" +
         		" * Metadata\n" +
@@ -732,13 +707,13 @@
         		"   * @private\n" +
         		"   * @type {org.apache.royale.core.View}\n" +
         		"   */\n" +
-        		"  this.$ID1_;\n" +
+        		"  this.$ID_8_1;\n" +
         		"  \n" +
         		"  /**\n" +
         		"   * @private\n" +
         		"   * @type {org.apache.royale.html.Label}\n" +
         		"   */\n" +
-        		"  this.$ID0_;\n" +
+        		"  this.$ID_8_0;\n" +
         		"  \n" +
         		"  /**\n" +
         		"   * @private\n" +
@@ -761,7 +736,7 @@
 				"      1,\n" +
 				"      '_id',\n" +
 				"      true,\n" +
-				"      '$ID1',\n" + 
+				"      '$ID_8_1',\n" + 
 				"      0,\n" +
 				"      0,\n" +
 				"      [\n" +
@@ -769,7 +744,7 @@
 				"        1,\n" +
 				"        '_id',\n" +
 				"        true,\n" +
-				"        '$ID0',\n" +
+				"        '$ID_8_0',\n" +
 				"        0,\n" +
 				"        0,\n" +
 				"        null\n" +
@@ -783,11 +758,6 @@
         		"goog.inherits(AppName, org.apache.royale.core.Application);\n" +
           		"\n" +
         		"\n" +
-        		"/**\n" +
-        		" * Prevent renaming of class. Needed for reflection.\n" +
-        		" */\n" +
-        		"goog.exportSymbol('AppName', AppName);\n" +
-        		"\n" +
         		"\n" +
 				"\n" +
         		"/**\n" +
@@ -797,7 +767,7 @@
         		"1,\n" +
         		"[\"org.apache.royale.net.HTTPConstants\", \"GET\"],\n" +
         		"null,\n" +
-        		"[\"$ID0\", \"text\"]\n" +
+        		"[\"$ID_8_0\", \"text\"]\n" +
         		"];\n" +
         		"/**\n" +
         		" * Metadata\n" +
@@ -876,13 +846,13 @@
         		"   * @private\n" +
         		"   * @type {org.apache.royale.core.View}\n" +
         		"   */\n" +
-        		"  this.$ID1_;\n" +
+        		"  this.$ID_8_1;\n" +
         		"  \n" +
         		"  /**\n" +
         		"   * @private\n" +
         		"   * @type {org.apache.royale.html.Label}\n" +
         		"   */\n" +
-        		"  this.$ID0_;\n" +
+        		"  this.$ID_8_0;\n" +
         		"  \n" +
         		"  /**\n" +
         		"   * @private\n" +
@@ -905,7 +875,7 @@
 				"      1,\n" +
 				"      '_id',\n" +
 				"      true,\n" +
-				"      '$ID1',\n" +
+				"      '$ID_8_1',\n" +
 				"      0,\n" +
 				"      0,\n" +
 				"      [\n" +
@@ -913,7 +883,7 @@
 				"        1,\n" +
 				"        '_id',\n" +
 				"        true,\n" +
-				"        '$ID0',\n" +
+				"        '$ID_8_0',\n" +
 				"        0,\n" +
 				"        0,\n" +
 				"        null\n" +
@@ -927,15 +897,9 @@
         		"goog.inherits(AppName, org.apache.royale.core.Application);\n" +
           		"\n" +
         		"\n" +
-        		"/**\n" +
-        		" * Prevent renaming of class. Needed for reflection.\n" +
-        		" */\n" +
-        		"goog.exportSymbol('AppName', AppName);\n" +
-        		"\n" +
         		"\n" +
 				"\n" +
         		"/**\n" +
-        		" * @export\n" +
         		" * @type {binding.ComplexValueObject}\n" +
         		" */\n" +
         		"AppName.prototype.firstOne = null;\n" +
@@ -948,7 +912,7 @@
         		"1,\n" +
         		"[\"firstOne\", \"subObject\", \"labelText\"],\n" +
         		"null,\n" +
-        		"[\"$ID0\", \"text\"],\n" +
+        		"[\"$ID_8_0\", \"text\"],\n" +
         		"0,\n" +
         		"2,\n" +
         		"\"firstOne\",\n" +
@@ -1055,13 +1019,13 @@
         		"   * @private\n" +
         		"   * @type {org.apache.royale.core.View}\n" +
         		"   */\n" +
-        		"  this.$ID1_;\n" +
+        		"  this.$ID_8_1;\n" +
         		"  \n" +
         		"  /**\n" +
         		"   * @private\n" +
         		"   * @type {org.apache.royale.html.Label}\n" +
         		"   */\n" +
-        		"  this.$ID0_;\n" +
+        		"  this.$ID_8_0;\n" +
         		"  \n" +
         		"  /**\n" +
         		"   * @private\n" +
@@ -1084,7 +1048,7 @@
 				"      1,\n" +
 				"      '_id',\n" +
 				"      true,\n" +
-				"      '$ID1',\n" +
+				"      '$ID_8_1',\n" +
 				"      0,\n" +
 				"      0,\n" +
 				"      [\n" +
@@ -1092,7 +1056,7 @@
 				"        2,\n" +
 				"        '_id',\n" +
 				"        true,\n" +
-				"        '$ID0',\n" +
+				"        '$ID_8_0',\n" +
 				"        'text',\n" +
 				"        true,\n" +
 				"        'Hello World',\n" +
@@ -1109,15 +1073,9 @@
         		"goog.inherits(AppName, org.apache.royale.core.Application);\n" +
           		"\n" +
         		"\n" +
-        		"/**\n" +
-        		" * Prevent renaming of class. Needed for reflection.\n" +
-        		" */\n" +
-        		"goog.exportSymbol('AppName', AppName);\n" +
-        		"\n" +
         		"\n" +
 				"\n" +
         		"/**\n" +
-        		" * @export\n" +
         		" * @type {XML}\n" +
         		" */\n" +
         		"AppName.prototype.xml = null;\n" +
@@ -1202,13 +1160,13 @@
         		"   * @private\n" +
         		"   * @type {org.apache.royale.core.View}\n" +
         		"   */\n" +
-        		"  this.$ID1_;\n" +
+        		"  this.$ID_8_1;\n" +
         		"  \n" +
         		"  /**\n" +
         		"   * @private\n" +
         		"   * @type {org.apache.royale.html.DropDownList}\n" +
         		"   */\n" +
-        		"  this.$ID0_;\n" +
+        		"  this.$ID_8_0;\n" +
         		"  \n" +
         		"  /**\n" +
         		"   * @private\n" +
@@ -1231,7 +1189,7 @@
 				"      1,\n" +
 				"      '_id',\n" +
 				"      true,\n" +
-				"      '$ID1',\n" +
+				"      '$ID_8_1',\n" +
 				"      0,\n" +
 				"      0,\n" +
 				"      [\n" +
@@ -1239,7 +1197,7 @@
 				"        2,\n" +
 				"        '_id',\n" +
 				"        true,\n" +
-				"        '$ID0',\n" +
+				"        '$ID_8_0',\n" +
 				"        'dataProvider',\n" +
 				"        true,\n" +
 				"        ['Hello','World'],\n" +
@@ -1256,11 +1214,6 @@
         		"goog.inherits(AppName, org.apache.royale.core.Application);\n" +
           		"\n" +
         		"\n" +
-        		"/**\n" +
-        		" * Prevent renaming of class. Needed for reflection.\n" +
-        		" */\n" +
-        		"goog.exportSymbol('AppName', AppName);\n" +
-        		"\n" +
         		"\n" +
 				"\n" +
         		"/**\n" +
@@ -1307,6 +1260,426 @@
     }
     
     @Test
+    public void testFXNumberDeclaration()
+    {
+        String code = "<basic:Application xmlns:fx=\"http://ns.adobe.com/mxml/2009\" xmlns:basic=\"library://ns.apache.org/royale/basic\">"
+        		+ "<fx:Declarations><fx:Number id=\"foo\">20.19</fx:Number>"
+                + "</fx:Declarations><basic:initialView><basic:View><basic:DropDownList dataProvider=\"['Hello', 'World']\"/></basic:View></basic:initialView></basic:Application>";
+
+        IMXMLDocumentNode dnode = (IMXMLDocumentNode) getNode(code,
+        		IMXMLDocumentNode.class, RoyaleTestBase.WRAP_LEVEL_NONE);
+
+        ((JSRoyaleEmitter)(mxmlBlockWalker.getASEmitter())).getModel().setCurrentClass(dnode.getDefinition());
+        mxmlBlockWalker.visitDocument(dnode);
+        String appName = dnode.getQualifiedName();
+        String outTemplate = "/**\n" +
+        		" * AppName\n" +
+        		" *\n" +
+        		" * @fileoverview\n" +
+        		" *\n" +
+        		" * @suppress {checkTypes|accessControls}\n" +
+        		" */\n" +
+        		"\n" +
+        		"goog.provide('AppName');\n" +
+        		"\n" +
+        		"goog.require('org.apache.royale.core.Application');\n" +
+        		"goog.require('org.apache.royale.core.View');\n" +
+        		"goog.require('org.apache.royale.html.DropDownList');\n" +
+        		"\n" +
+        		"\n" +
+        		"\n" +
+        		"/**\n" +
+        		" * @constructor\n" +
+        		" * @extends {org.apache.royale.core.Application}\n" +
+        		" */\n" +
+        		"AppName = function() {\n" +
+        		"  AppName.base(this, 'constructor');\n" +
+        		"  \n" +
+        		"  this.foo = 20.19;\n" +
+        		"  /**\n" +
+        		"   * @private\n" +
+        		"   * @type {org.apache.royale.core.View}\n" +
+        		"   */\n" +
+        		"  this.$ID_8_1;\n" +
+        		"  \n" +
+        		"  /**\n" +
+        		"   * @private\n" +
+        		"   * @type {org.apache.royale.html.DropDownList}\n" +
+        		"   */\n" +
+        		"  this.$ID_8_0;\n" +
+        		"  \n" +
+        		"  /**\n" +
+        		"   * @private\n" +
+        		"   * @type {Array}\n" +
+        		"   */\n" +
+        		"  this.mxmldd;\n" +
+        		"  \n" +
+        		"  /**\n" +
+        		"   * @private\n" +
+        		"   * @type {Array}\n" +
+        		"   */\n" +
+        		"  this.mxmldp;\n" +
+        		"\n" +
+        		"  this.generateMXMLAttributes([\n" +
+        		"    1,\n" +
+        		"    'initialView',\n" +
+        		"    false,\n" +
+				"    [\n" +
+				"      org.apache.royale.core.View,\n" +
+				"      1,\n" +
+				"      '_id',\n" +
+				"      true,\n" +
+				"      '$ID_8_1',\n" +
+				"      0,\n" +
+				"      0,\n" +
+				"      [\n" +
+				"        org.apache.royale.html.DropDownList,\n" +
+				"        2,\n" +
+				"        '_id',\n" +
+				"        true,\n" +
+				"        '$ID_8_0',\n" +
+				"        'dataProvider',\n" +
+				"        true,\n" +
+				"        ['Hello','World'],\n" +
+				"        0,\n" +
+				"        0,\n" +
+				"        null\n" +
+				"      ]\n" +
+				"    ],\n" +
+        		"    0,\n" +
+        		"    0\n" +
+        		"  ]);\n" +
+        		"  \n" +
+        		"};\n" +
+        		"goog.inherits(AppName, org.apache.royale.core.Application);\n" +
+          		"\n" +
+        		"\n" +
+        		"\n" +
+				"\n" +
+        		"/**\n" +
+        		" * @export\n" +
+        		" * @type {number}\n" +
+        		" */\n" +
+        		"AppName.prototype.foo;\n" +
+				"\n" +
+        		"/**\n" +
+        		" * Metadata\n" +
+        		" *\n" +
+        		" * @type {Object.<string, Array.<Object>>}\n" +
+        		" */\n" +
+        		"AppName.prototype.ROYALE_CLASS_INFO = { names: [{ name: 'AppName', qName: 'AppName', kind: 'class'  }] };\n" +
+          		"\n" +
+        		"\n" +
+        		"\n" +
+        		"/**\n" +
+        		" * Reflection\n" +
+        		" *\n" +
+        		" * @return {Object.<string, Function>}\n" +
+        		" */\n" +
+        		"AppName.prototype.ROYALE_REFLECTION_INFO = function () {\n" +
+        		"  return {\n" +
+        		"    variables: function () {\n" +
+        		"      return {\n" +
+        		"        'foo': { type: 'Number', get_set: function (/** AppName */ inst, /** * */ v) {return v !== undefined ? inst.foo = v : inst.foo;}}\n" +
+        		"      };\n" +
+        		"    },\n" +
+        		"    methods: function () {\n" +
+        		"      return {\n" +
+				"        'AppName': { type: '', declaredBy: 'AppName'}\n"+
+        		"      };\n" +
+        		"    }\n" +
+        		"  };\n" +
+        		"};\n" + 
+        		"/**\n" +
+        		" * @const\n" +
+        		" * @type {number}\n" +
+        		" */\n" +
+        		"AppName.prototype.ROYALE_COMPILE_FLAGS = 9;";
+
+        assertOutMXMLPostProcess(outTemplate.replaceAll("AppName", appName), true);
+    }
+    
+    @Test
+    public void testFXBooleanDeclaration()
+    {
+        String code = "<basic:Application xmlns:fx=\"http://ns.adobe.com/mxml/2009\" xmlns:basic=\"library://ns.apache.org/royale/basic\">"
+        		+ "<fx:Declarations><fx:Boolean id=\"foo\">true</fx:Boolean>"
+                + "</fx:Declarations><basic:initialView><basic:View><basic:DropDownList dataProvider=\"['Hello', 'World']\"/></basic:View></basic:initialView></basic:Application>";
+
+        IMXMLDocumentNode dnode = (IMXMLDocumentNode) getNode(code,
+        		IMXMLDocumentNode.class, RoyaleTestBase.WRAP_LEVEL_NONE);
+
+        ((JSRoyaleEmitter)(mxmlBlockWalker.getASEmitter())).getModel().setCurrentClass(dnode.getDefinition());
+        mxmlBlockWalker.visitDocument(dnode);
+        String appName = dnode.getQualifiedName();
+        String outTemplate = "/**\n" +
+        		" * AppName\n" +
+        		" *\n" +
+        		" * @fileoverview\n" +
+        		" *\n" +
+        		" * @suppress {checkTypes|accessControls}\n" +
+        		" */\n" +
+        		"\n" +
+        		"goog.provide('AppName');\n" +
+        		"\n" +
+        		"goog.require('org.apache.royale.core.Application');\n" +
+        		"goog.require('org.apache.royale.core.View');\n" +
+        		"goog.require('org.apache.royale.html.DropDownList');\n" +
+        		"\n" +
+        		"\n" +
+        		"\n" +
+        		"/**\n" +
+        		" * @constructor\n" +
+        		" * @extends {org.apache.royale.core.Application}\n" +
+        		" */\n" +
+        		"AppName = function() {\n" +
+        		"  AppName.base(this, 'constructor');\n" +
+        		"  \n" +
+        		"  this.foo = true;\n" +
+        		"  /**\n" +
+        		"   * @private\n" +
+        		"   * @type {org.apache.royale.core.View}\n" +
+        		"   */\n" +
+        		"  this.$ID_8_1;\n" +
+        		"  \n" +
+        		"  /**\n" +
+        		"   * @private\n" +
+        		"   * @type {org.apache.royale.html.DropDownList}\n" +
+        		"   */\n" +
+        		"  this.$ID_8_0;\n" +
+        		"  \n" +
+        		"  /**\n" +
+        		"   * @private\n" +
+        		"   * @type {Array}\n" +
+        		"   */\n" +
+        		"  this.mxmldd;\n" +
+        		"  \n" +
+        		"  /**\n" +
+        		"   * @private\n" +
+        		"   * @type {Array}\n" +
+        		"   */\n" +
+        		"  this.mxmldp;\n" +
+        		"\n" +
+        		"  this.generateMXMLAttributes([\n" +
+        		"    1,\n" +
+        		"    'initialView',\n" +
+        		"    false,\n" +
+				"    [\n" +
+				"      org.apache.royale.core.View,\n" +
+				"      1,\n" +
+				"      '_id',\n" +
+				"      true,\n" +
+				"      '$ID_8_1',\n" +
+				"      0,\n" +
+				"      0,\n" +
+				"      [\n" +
+				"        org.apache.royale.html.DropDownList,\n" +
+				"        2,\n" +
+				"        '_id',\n" +
+				"        true,\n" +
+				"        '$ID_8_0',\n" +
+				"        'dataProvider',\n" +
+				"        true,\n" +
+				"        ['Hello','World'],\n" +
+				"        0,\n" +
+				"        0,\n" +
+				"        null\n" +
+				"      ]\n" +
+				"    ],\n" +
+        		"    0,\n" +
+        		"    0\n" +
+        		"  ]);\n" +
+        		"  \n" +
+        		"};\n" +
+        		"goog.inherits(AppName, org.apache.royale.core.Application);\n" +
+          		"\n" +
+        		"\n" +
+        		"\n" +
+				"\n" +
+        		"/**\n" +
+        		" * @export\n" +
+        		" * @type {boolean}\n" +
+        		" */\n" +
+        		"AppName.prototype.foo;\n" +
+				"\n" +
+        		"/**\n" +
+        		" * Metadata\n" +
+        		" *\n" +
+        		" * @type {Object.<string, Array.<Object>>}\n" +
+        		" */\n" +
+        		"AppName.prototype.ROYALE_CLASS_INFO = { names: [{ name: 'AppName', qName: 'AppName', kind: 'class'  }] };\n" +
+          		"\n" +
+        		"\n" +
+        		"\n" +
+        		"/**\n" +
+        		" * Reflection\n" +
+        		" *\n" +
+        		" * @return {Object.<string, Function>}\n" +
+        		" */\n" +
+        		"AppName.prototype.ROYALE_REFLECTION_INFO = function () {\n" +
+        		"  return {\n" +
+        		"    variables: function () {\n" +
+        		"      return {\n" +
+        		"        'foo': { type: 'Boolean', get_set: function (/** AppName */ inst, /** * */ v) {return v !== undefined ? inst.foo = v : inst.foo;}}\n" +
+        		"      };\n" +
+        		"    },\n" +
+        		"    methods: function () {\n" +
+        		"      return {\n" +
+				"        'AppName': { type: '', declaredBy: 'AppName'}\n"+
+        		"      };\n" +
+        		"    }\n" +
+        		"  };\n" +
+        		"};\n" + 
+        		"/**\n" +
+        		" * @const\n" +
+        		" * @type {number}\n" +
+        		" */\n" +
+        		"AppName.prototype.ROYALE_COMPILE_FLAGS = 9;";
+
+        assertOutMXMLPostProcess(outTemplate.replaceAll("AppName", appName), true);
+    }
+    
+    @Test
+    public void testFXIntDeclaration()
+    {
+        String code = "<basic:Application xmlns:fx=\"http://ns.adobe.com/mxml/2009\" xmlns:basic=\"library://ns.apache.org/royale/basic\">"
+        		+ "<fx:Declarations><fx:int id=\"foo\">2020</fx:int>"
+                + "</fx:Declarations><basic:initialView><basic:View><basic:DropDownList dataProvider=\"['Hello', 'World']\"/></basic:View></basic:initialView></basic:Application>";
+
+        IMXMLDocumentNode dnode = (IMXMLDocumentNode) getNode(code,
+        		IMXMLDocumentNode.class, RoyaleTestBase.WRAP_LEVEL_NONE);
+
+        ((JSRoyaleEmitter)(mxmlBlockWalker.getASEmitter())).getModel().setCurrentClass(dnode.getDefinition());
+        mxmlBlockWalker.visitDocument(dnode);
+        String appName = dnode.getQualifiedName();
+        String outTemplate = "/**\n" +
+        		" * AppName\n" +
+        		" *\n" +
+        		" * @fileoverview\n" +
+        		" *\n" +
+        		" * @suppress {checkTypes|accessControls}\n" +
+        		" */\n" +
+        		"\n" +
+        		"goog.provide('AppName');\n" +
+        		"\n" +
+        		"goog.require('org.apache.royale.core.Application');\n" +
+        		"goog.require('org.apache.royale.core.View');\n" +
+        		"goog.require('org.apache.royale.html.DropDownList');\n" +
+        		"\n" +
+        		"\n" +
+        		"\n" +
+        		"/**\n" +
+        		" * @constructor\n" +
+        		" * @extends {org.apache.royale.core.Application}\n" +
+        		" */\n" +
+        		"AppName = function() {\n" +
+        		"  AppName.base(this, 'constructor');\n" +
+        		"  \n" +
+        		"  this.foo = 2020;\n" +
+        		"  /**\n" +
+        		"   * @private\n" +
+        		"   * @type {org.apache.royale.core.View}\n" +
+        		"   */\n" +
+        		"  this.$ID_8_1;\n" +
+        		"  \n" +
+        		"  /**\n" +
+        		"   * @private\n" +
+        		"   * @type {org.apache.royale.html.DropDownList}\n" +
+        		"   */\n" +
+        		"  this.$ID_8_0;\n" +
+        		"  \n" +
+        		"  /**\n" +
+        		"   * @private\n" +
+        		"   * @type {Array}\n" +
+        		"   */\n" +
+        		"  this.mxmldd;\n" +
+        		"  \n" +
+        		"  /**\n" +
+        		"   * @private\n" +
+        		"   * @type {Array}\n" +
+        		"   */\n" +
+        		"  this.mxmldp;\n" +
+        		"\n" +
+        		"  this.generateMXMLAttributes([\n" +
+        		"    1,\n" +
+        		"    'initialView',\n" +
+        		"    false,\n" +
+				"    [\n" +
+				"      org.apache.royale.core.View,\n" +
+				"      1,\n" +
+				"      '_id',\n" +
+				"      true,\n" +
+				"      '$ID_8_1',\n" +
+				"      0,\n" +
+				"      0,\n" +
+				"      [\n" +
+				"        org.apache.royale.html.DropDownList,\n" +
+				"        2,\n" +
+				"        '_id',\n" +
+				"        true,\n" +
+				"        '$ID_8_0',\n" +
+				"        'dataProvider',\n" +
+				"        true,\n" +
+				"        ['Hello','World'],\n" +
+				"        0,\n" +
+				"        0,\n" +
+				"        null\n" +
+				"      ]\n" +
+				"    ],\n" +
+        		"    0,\n" +
+        		"    0\n" +
+        		"  ]);\n" +
+        		"  \n" +
+        		"};\n" +
+        		"goog.inherits(AppName, org.apache.royale.core.Application);\n" +
+          		"\n" +
+        		"\n" +
+        		"\n" +
+				"\n" +
+        		"/**\n" +
+        		" * @export\n" +
+        		" * @type {number}\n" +
+        		" */\n" +
+        		"AppName.prototype.foo;\n" +
+				"\n" +
+        		"/**\n" +
+        		" * Metadata\n" +
+        		" *\n" +
+        		" * @type {Object.<string, Array.<Object>>}\n" +
+        		" */\n" +
+        		"AppName.prototype.ROYALE_CLASS_INFO = { names: [{ name: 'AppName', qName: 'AppName', kind: 'class'  }] };\n" +
+          		"\n" +
+        		"\n" +
+        		"\n" +
+        		"/**\n" +
+        		" * Reflection\n" +
+        		" *\n" +
+        		" * @return {Object.<string, Function>}\n" +
+        		" */\n" +
+        		"AppName.prototype.ROYALE_REFLECTION_INFO = function () {\n" +
+        		"  return {\n" +
+        		"    variables: function () {\n" +
+        		"      return {\n" +
+        		"        'foo': { type: 'int', get_set: function (/** AppName */ inst, /** * */ v) {return v !== undefined ? inst.foo = v : inst.foo;}}\n" +
+        		"      };\n" +
+        		"    },\n" +
+        		"    methods: function () {\n" +
+        		"      return {\n" +
+				"        'AppName': { type: '', declaredBy: 'AppName'}\n"+
+        		"      };\n" +
+        		"    }\n" +
+        		"  };\n" +
+        		"};\n" + 
+        		"/**\n" +
+        		" * @const\n" +
+        		" * @type {number}\n" +
+        		" */\n" +
+        		"AppName.prototype.ROYALE_COMPILE_FLAGS = 9;";
+
+        assertOutMXMLPostProcess(outTemplate.replaceAll("AppName", appName), true);
+    }
+    
+    @Test
     public void testFXArrayDeclaration()
     {
         String code = "<basic:Application xmlns:fx=\"http://ns.adobe.com/mxml/2009\" xmlns:basic=\"library://ns.apache.org/royale/basic\">"
@@ -1347,13 +1720,13 @@
         		"   * @private\n" +
         		"   * @type {org.apache.royale.core.View}\n" +
         		"   */\n" +
-        		"  this.$ID3_;\n" +
+        		"  this.$ID_8_3;\n" +
         		"  \n" +
         		"  /**\n" +
         		"   * @private\n" +
         		"   * @type {org.apache.royale.html.DropDownList}\n" +
         		"   */\n" +
-        		"  this.$ID2_;\n" +
+        		"  this.$ID_8_2;\n" +
         		"  \n" +
         		"  /**\n" +
         		"   * @private\n" +
@@ -1376,7 +1749,7 @@
 				"      1,\n" +
 				"      '_id',\n" +
 				"      true,\n" +
-				"      '$ID3',\n" +
+				"      '$ID_8_3',\n" +
 				"      0,\n" +
 				"      0,\n" +
 				"      [\n" +
@@ -1384,7 +1757,7 @@
 				"        2,\n" +
 				"        '_id',\n" +
 				"        true,\n" +
-				"        '$ID2',\n" +
+				"        '$ID_8_2',\n" +
 				"        'dataProvider',\n" +
 				"        true,\n" +
 				"        ['Hello','World'],\n" +
@@ -1401,10 +1774,145 @@
         		"goog.inherits(AppName, org.apache.royale.core.Application);\n" +
           		"\n" +
         		"\n" +
+        		"\n" +
+				"\n" +
         		"/**\n" +
-        		" * Prevent renaming of class. Needed for reflection.\n" +
+        		" * @export\n" +
+        		" * @type {Array}\n" +
         		" */\n" +
-        		"goog.exportSymbol('AppName', AppName);\n" +
+        		"AppName.prototype.foo;\n" +
+				"\n" +
+        		"/**\n" +
+        		" * Metadata\n" +
+        		" *\n" +
+        		" * @type {Object.<string, Array.<Object>>}\n" +
+        		" */\n" +
+        		"AppName.prototype.ROYALE_CLASS_INFO = { names: [{ name: 'AppName', qName: 'AppName', kind: 'class'  }] };\n" +
+          		"\n" +
+        		"\n" +
+        		"\n" +
+        		"/**\n" +
+        		" * Reflection\n" +
+        		" *\n" +
+        		" * @return {Object.<string, Function>}\n" +
+        		" */\n" +
+        		"AppName.prototype.ROYALE_REFLECTION_INFO = function () {\n" +
+        		"  return {\n" +
+        		"    variables: function () {\n" +
+        		"      return {\n" +
+        		"        'foo': { type: 'Array', get_set: function (/** AppName */ inst, /** * */ v) {return v !== undefined ? inst.foo = v : inst.foo;}}\n" +
+        		"      };\n" +
+        		"    },\n" +
+        		"    methods: function () {\n" +
+        		"      return {\n" +
+				"        'AppName': { type: '', declaredBy: 'AppName'}\n"+
+        		"      };\n" +
+        		"    }\n" +
+        		"  };\n" +
+        		"};\n" + 
+        		"/**\n" +
+        		" * @const\n" +
+        		" * @type {number}\n" +
+        		" */\n" +
+        		"AppName.prototype.ROYALE_COMPILE_FLAGS = 9;";
+
+        assertOutMXMLPostProcess(outTemplate.replaceAll("AppName", appName), true);
+    }
+    
+    @Test
+    public void testFXArrayOfObjectsDeclaration()
+    {
+        String code = "<basic:Application xmlns:fx=\"http://ns.adobe.com/mxml/2009\" xmlns:basic=\"library://ns.apache.org/royale/basic\">"
+        		+ "<fx:Declarations><fx:Array id=\"foo\"><fx:Object stringProp=\"A String\" intProp=\"2000\" numProp=\"20.19\" boolProp=\"true\"/><fx:Object stringProp=\"Another String\" intProp=\"2021\" numProp=\"20.21\" boolProp=\"false\"/></fx:Array>"
+                + "</fx:Declarations><basic:initialView><basic:View><basic:DropDownList dataProvider=\"['Hello', 'World']\"/></basic:View></basic:initialView></basic:Application>";
+
+        IMXMLDocumentNode dnode = (IMXMLDocumentNode) getNode(code,
+        		IMXMLDocumentNode.class, RoyaleTestBase.WRAP_LEVEL_NONE);
+
+        ((JSRoyaleEmitter)(mxmlBlockWalker.getASEmitter())).getModel().setCurrentClass(dnode.getDefinition());
+        mxmlBlockWalker.visitDocument(dnode);
+        String appName = dnode.getQualifiedName();
+        String outTemplate = "/**\n" +
+        		" * AppName\n" +
+        		" *\n" +
+        		" * @fileoverview\n" +
+        		" *\n" +
+        		" * @suppress {checkTypes|accessControls}\n" +
+        		" */\n" +
+        		"\n" +
+        		"goog.provide('AppName');\n" +
+        		"\n" +
+        		"goog.require('org.apache.royale.core.Application');\n" +
+        		"goog.require('org.apache.royale.core.View');\n" +
+        		"goog.require('org.apache.royale.html.DropDownList');\n" +
+        		"\n" +
+        		"\n" +
+        		"\n" +
+        		"/**\n" +
+        		" * @constructor\n" +
+        		" * @extends {org.apache.royale.core.Application}\n" +
+        		" */\n" +
+        		"AppName = function() {\n" +
+        		"  AppName.base(this, 'constructor');\n" +
+        		"  \n" +
+        		"  this.foo = [{stringProp: 'A String', intProp: 2000, numProp: 20.19, boolProp: true}, {stringProp: 'Another String', intProp: 2021, numProp: 20.21, boolProp: false}];\n" +
+        		"  /**\n" +
+        		"   * @private\n" +
+        		"   * @type {org.apache.royale.core.View}\n" +
+        		"   */\n" +
+        		"  this.$ID_8_3;\n" +
+        		"  \n" +
+        		"  /**\n" +
+        		"   * @private\n" +
+        		"   * @type {org.apache.royale.html.DropDownList}\n" +
+        		"   */\n" +
+        		"  this.$ID_8_2;\n" +
+        		"  \n" +
+        		"  /**\n" +
+        		"   * @private\n" +
+        		"   * @type {Array}\n" +
+        		"   */\n" +
+        		"  this.mxmldd;\n" +
+        		"  \n" +
+        		"  /**\n" +
+        		"   * @private\n" +
+        		"   * @type {Array}\n" +
+        		"   */\n" +
+        		"  this.mxmldp;\n" +
+        		"\n" +
+        		"  this.generateMXMLAttributes([\n" +
+        		"    1,\n" +
+        		"    'initialView',\n" +
+        		"    false,\n" +
+				"    [\n" +
+				"      org.apache.royale.core.View,\n" +
+				"      1,\n" +
+				"      '_id',\n" +
+				"      true,\n" +
+				"      '$ID_8_3',\n" +
+				"      0,\n" +
+				"      0,\n" +
+				"      [\n" +
+				"        org.apache.royale.html.DropDownList,\n" +
+				"        2,\n" +
+				"        '_id',\n" +
+				"        true,\n" +
+				"        '$ID_8_2',\n" +
+				"        'dataProvider',\n" +
+				"        true,\n" +
+				"        ['Hello','World'],\n" +
+				"        0,\n" +
+				"        0,\n" +
+				"        null\n" +
+				"      ]\n" +
+				"    ],\n" +
+        		"    0,\n" +
+        		"    0\n" +
+        		"  ]);\n" +
+        		"  \n" +
+        		"};\n" +
+        		"goog.inherits(AppName, org.apache.royale.core.Application);\n" +
+          		"\n" +
         		"\n" +
         		"\n" +
 				"\n" +
@@ -1494,13 +2002,13 @@
         		"   * @private\n" +
         		"   * @type {org.apache.royale.core.View}\n" +
         		"   */\n" +
-        		"  this.$ID1_;\n" +
+        		"  this.$ID_8_1;\n" +
         		"  \n" +
         		"  /**\n" +
         		"   * @private\n" +
         		"   * @type {org.apache.royale.html.DropDownList}\n" +
         		"   */\n" +
-        		"  this.$ID0_;\n" +
+        		"  this.$ID_8_0;\n" +
         		"  \n" +
         		"  /**\n" +
         		"   * @private\n" +
@@ -1523,7 +2031,7 @@
 				"      1,\n" +
 				"      '_id',\n" +
 				"      true,\n" +
-				"      '$ID1',\n" +
+				"      '$ID_8_1',\n" +
 				"      0,\n" +
 				"      0,\n" +
 				"      [\n" +
@@ -1531,7 +2039,7 @@
 				"        2,\n" +
 				"        '_id',\n" +
 				"        true,\n" +
-				"        '$ID0',\n" +
+				"        '$ID_8_0',\n" +
 				"        'dataProvider',\n" +
 				"        true,\n" +
 				"        ['Hello','World'],\n" +
@@ -1548,11 +2056,6 @@
         		"goog.inherits(AppName, org.apache.royale.core.Application);\n" +
           		"\n" +
         		"\n" +
-        		"/**\n" +
-        		" * Prevent renaming of class. Needed for reflection.\n" +
-        		" */\n" +
-        		"goog.exportSymbol('AppName', AppName);\n" +
-        		"\n" +
         		"\n" +
 				"\n" +
         		"/**\n" +
@@ -1640,13 +2143,13 @@
         		"   * @private\n" +
         		"   * @type {org.apache.royale.core.View}\n" +
         		"   */\n" +
-        		"  this.$ID1_;\n" +
+        		"  this.$ID_8_1;\n" +
         		"  \n" +
         		"  /**\n" +
         		"   * @private\n" +
         		"   * @type {org.apache.royale.html.DropDownList}\n" +
         		"   */\n" +
-        		"  this.$ID0_;\n" +
+        		"  this.$ID_8_0;\n" +
         		"  \n" +
         		"  /**\n" +
         		"   * @private\n" +
@@ -1669,7 +2172,7 @@
 				"      1,\n" +
 				"      '_id',\n" +
 				"      true,\n" +
-				"      '$ID1',\n" +
+				"      '$ID_8_1',\n" +
 				"      0,\n" +
 				"      0,\n" +
 				"      [\n" +
@@ -1677,7 +2180,7 @@
 				"        2,\n" +
 				"        '_id',\n" +
 				"        true,\n" +
-				"        '$ID0',\n" +
+				"        '$ID_8_0',\n" +
 				"        'dataProvider',\n" +
 				"        true,\n" +
 				"        ['Hello','World'],\n" +
@@ -1694,11 +2197,6 @@
         		"goog.inherits(AppName, org.apache.royale.core.Application);\n" +
           		"\n" +
         		"\n" +
-        		"/**\n" +
-        		" * Prevent renaming of class. Needed for reflection.\n" +
-        		" */\n" +
-        		"goog.exportSymbol('AppName', AppName);\n" +
-        		"\n" +
         		"\n" +
 				"\n" +
         		"/**\n" +
@@ -1797,11 +2295,6 @@
         		"goog.inherits(AppName, org.apache.royale.core.Application);\n" +
           		"\n" +
         		"\n" +
-        		"/**\n" +
-        		" * Prevent renaming of class. Needed for reflection.\n" +
-        		" */\n" +
-        		"goog.exportSymbol('AppName', AppName);\n" +
-        		"\n" +
         		"\n" +
 				"\n" +
         		"/**\n" +
@@ -1828,17 +2321,12 @@
         		"    0,\n" +
         		"    1,\n" +
         		"    'change',\n" +
-        		"this.$EH0\n" +
+        		"    this.$EH_9_0\n" +
         		"  ]);\n" +
         		"  \n" +
         		"};\n" +
         		"goog.inherits(AppName.AppName_component0, org.apache.royale.html.DropDownList);\n" +
           		"\n" +
-        		"\n" +
-        		"/**\n" +
-        		" * Prevent renaming of class. Needed for reflection.\n" +
-        		" */\n" +
-        		"goog.exportSymbol('AppName.AppName_component0', AppName.AppName_component0);\n" +
 				"\n" +
 				"\n" +
         		"/**\n" +
@@ -1876,7 +2364,7 @@
         		" * @export\n" +
         		" * @param {org.apache.royale.events.Event} event\n" +
         		" */\n" +
-        		"AppName.AppName_component0.prototype.$EH0 = function(event)\n" +
+        		"AppName.AppName_component0.prototype.$EH_9_0 = function(event)\n" +
 				"{\n" +
 				"  org.apache.royale.utils.Language.trace('bar');\n" +
 				"};\n" +
@@ -1955,7 +2443,7 @@
         		"   * @private\n" +
         		"   * @type {org.apache.royale.charts.beads.DataTipBead}\n" +
         		"   */\n" +
-        		"  this.$ID0_;\n" +
+        		"  this.$ID_8_0;\n" +
         		"  \n" +
         		"  /**\n" +
         		"   * @private\n" +
@@ -1978,7 +2466,7 @@
 				"      2,\n" +
 				"      '_id',\n" +
 				"      true,\n" +
-				"      '$ID0',\n" +
+				"      '$ID_8_0',\n" +
 				"      'labelFunction',\n" +
 				"      true,\n" +
 				"      org.apache.royale.utils.Language.closure(this.fn_test, this, 'fn_test'),\n" +
@@ -1994,15 +2482,9 @@
         		"goog.inherits(AppName, org.apache.royale.core.Application);\n" +
           		"\n" +
         		"\n" +
-        		"/**\n" +
-        		" * Prevent renaming of class. Needed for reflection.\n" +
-        		" */\n" +
-        		"goog.exportSymbol('AppName', AppName);\n" +
-        		"\n" +
         		"\n" +
 				"\n" +
         		"/**\n" +
-        		" * @export\n" +
         		" * @param {string} foo\n" +
         		" */\n" +
         		"AppName.prototype.fn_test = function(foo) {\n" +
@@ -2083,7 +2565,7 @@
         		"   * @private\n" +
         		"   * @type {org.apache.royale.charts.beads.DataTipBead}\n" +
         		"   */\n" +
-        		"  this.$ID0_;\n" +
+        		"  this.$ID_8_0;\n" +
         		"  \n" +
         		"  /**\n" +
         		"   * @private\n" +
@@ -2106,7 +2588,7 @@
 				"      2,\n" +
 				"      '_id',\n" +
 				"      true,\n" +
-				"      '$ID0',\n" +
+				"      '$ID_8_0',\n" +
 				"      'labelFunction',\n" +
 				"      true,\n" +
 				"      org.apache.royale.utils.Language.closure(this.initialView.addedToParent, this.initialView, 'addedToParent'),\n" +
@@ -2122,11 +2604,6 @@
         		"goog.inherits(AppName, org.apache.royale.core.Application);\n" +
           		"\n" +
         		"\n" +
-        		"/**\n" +
-        		" * Prevent renaming of class. Needed for reflection.\n" +
-        		" */\n" +
-        		"goog.exportSymbol('AppName', AppName);\n" +
-        		"\n" +
         		"\n" +
 				"\n" +
         		"/**\n" +
@@ -2201,7 +2678,7 @@
         		"   * @private\n" +
         		"   * @type {org.apache.royale.charts.beads.DataTipBead}\n" +
         		"   */\n" +
-        		"  this.$ID0_;\n" +
+        		"  this.$ID_8_0;\n" +
         		"  \n" +
         		"  /**\n" +
         		"   * @private\n" +
@@ -2224,7 +2701,7 @@
 				"      2,\n" +
 				"      '_id',\n" +
 				"      true,\n" +
-				"      '$ID0',\n" +
+				"      '$ID_8_0',\n" +
 				"      'labelFunction',\n" +
 				"      true,\n" +
 				"      AppName.fn_test,\n" +
@@ -2240,15 +2717,10 @@
         		"goog.inherits(AppName, org.apache.royale.core.Application);\n" +
           		"\n" +
         		"\n" +
-        		"/**\n" +
-        		" * Prevent renaming of class. Needed for reflection.\n" +
-        		" */\n" +
-        		"goog.exportSymbol('AppName', AppName);\n" +
-        		"\n" +
         		"\n" +
 				"\n" +
-        		"/**\n" +
-        		" * @export\n" +
+				"/**\n" +
+				" * @nocollapse\n" + 
         		" * @param {string} foo\n" +
         		" */\n" +
         		"AppName.fn_test = function(foo) {\n" +
@@ -2337,7 +2809,7 @@
         		"   * @private\n" +
         		"   * @type {org.apache.royale.charts.beads.DataTipBead}\n" +
         		"   */\n" +
-        		"  this.$ID0_;\n" +
+        		"  this.$ID_8_0;\n" +
         		"  \n" +
         		"  /**\n" +
         		"   * @private\n" +
@@ -2360,7 +2832,7 @@
 				"      2,\n" +
 				"      '_id',\n" +
 				"      true,\n" +
-				"      '$ID0',\n" +
+				"      '$ID_8_0',\n" +
 				"      'labelFunction',\n" +
 				"      true,\n" +
 				"      org.apache.royale.utils.Language.closure(this.AppName_fn_test, this, 'AppName_fn_test'),\n" +
@@ -2376,11 +2848,6 @@
         		"goog.inherits(AppName, org.apache.royale.core.Application);\n" +
           		"\n" +
         		"\n" +
-        		"/**\n" +
-        		" * Prevent renaming of class. Needed for reflection.\n" +
-        		" */\n" +
-        		"goog.exportSymbol('AppName', AppName);\n" +
-        		"\n" +
         		"\n" +
 				"\n" +
         		"/**\n" +
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/mxml/royale/TestRoyaleMXMLScript.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/mxml/royale/TestRoyaleMXMLScript.java
index 7767429..2cea553 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/mxml/royale/TestRoyaleMXMLScript.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/mxml/royale/TestRoyaleMXMLScript.java
@@ -79,15 +79,9 @@
         		"goog.inherits(AppName, org.apache.royale.core.Application);\n" +
           		"\n" +
         		"\n" +
-        		"/**\n" +
-        		" * Prevent renaming of class. Needed for reflection.\n" +
-        		" */\n" +
-        		"goog.exportSymbol('AppName', AppName);\n" +
-        		"\n" +
         		"\n" +
 				"\n" +
 				"/**\n" +
-				" * @export\n" +
 				" * @override\n" +
 				" */\n" +
 				"AppName.prototype.addedToParent = function() {\n" +
@@ -179,11 +173,6 @@
         		"goog.inherits(AppName, org.apache.royale.core.Application);\n" +
           		"\n" +
         		"\n" +
-        		"/**\n" +
-        		" * Prevent renaming of class. Needed for reflection.\n" +
-        		" */\n" +
-        		"goog.exportSymbol('AppName', AppName);\n" +
-        		"\n" +
         		"\n" +
 				"\n" +
 				"/**\n" +
@@ -194,7 +183,6 @@
         		"\n" +
 				"\n" +
 				"/**\n" +
-				" * @export\n" +
 				" */\n" +
 				"AppName.prototype.bar = function() {\n" +
 				"};\n" +
@@ -283,15 +271,9 @@
         		"goog.inherits(AppName, org.apache.royale.core.Application);\n" +
           		"\n" +
         		"\n" +
-        		"/**\n" +
-        		" * Prevent renaming of class. Needed for reflection.\n" +
-        		" */\n" +
-        		"goog.exportSymbol('AppName', AppName);\n" +
-        		"\n" +
         		"\n" +
 				"\n" +
 				"/**\n" +
-				" * @export\n" +
 				" * @type {Array}\n" +
 				" */\n" +
 				"AppName.prototype.foo;\n" +
@@ -348,66 +330,59 @@
         mxmlBlockWalker.visitDocument(dnode);
         String appName = dnode.getQualifiedName();
         String outTemplate = "/**\n" +
-				" * AppName\n" +
-				" *\n" +
-				" * @fileoverview\n" +
-				" *\n" +
-				" * @suppress {checkTypes|accessControls}\n" +
-				" */\n" +
-				"\n" +
-				"goog.provide('AppName');\n" +
-				"\n" +
-				"goog.require('org.apache.royale.core.Application');\n" +
-				"goog.require('org.apache.royale.events.CloseEvent');\n" +
-				"\n" +
-				"\n" +
-				"\n" +
-				"/**\n" +
-				" * @constructor\n" +
-				" * @extends {org.apache.royale.core.Application}\n" +
-				" */\n" +
-				"AppName = function() {\n" +
-				"  AppName.base(this, 'constructor');\n" +
-				"  \n" +
-				"  /**\n" +
-				"   * @private\n" +
-				"   * @type {Array}\n" +
-				"   */\n" +
-				"  this.mxmldd;\n" +
-				"  \n" +
-				"  /**\n" +
-				"   * @private\n" +
-				"   * @type {Array}\n" +
-				"   */\n" +
-				"  this.mxmldp;\n" +
-				"};\n" +
-				"goog.inherits(AppName, org.apache.royale.core.Application);\n" +
-				"\n" +
-				"\n" +
-				"/**\n" +
-				" * Prevent renaming of class. Needed for reflection.\n" +
-				" */\n" +
-				"goog.exportSymbol('AppName', AppName);\n" +
-				"\n" +
-				"\n" +
+        		" * AppName\n" +
+        		" *\n" +
+        		" * @fileoverview\n" +
+        		" *\n" +
+        		" * @suppress {checkTypes|accessControls}\n" +
+        		" */\n" +
+        		"\n" +
+        		"goog.provide('AppName');\n" +
+        		"\n" +
+        		"goog.require('org.apache.royale.core.Application');\n" +
+        		"goog.require('org.apache.royale.events.CloseEvent');\n" +
+        		"\n" +
+        		"\n" +
+        		"\n" +
+        		"/**\n" +
+        		" * @constructor\n" +
+        		" * @extends {org.apache.royale.core.Application}\n" +
+        		" */\n" +
+        		"AppName = function() {\n" +
+        		"  AppName.base(this, 'constructor');\n" +
+        		"  \n" +
+        		"  /**\n" +
+        		"   * @private\n" +
+        		"   * @type {Array}\n" +
+        		"   */\n" +
+        		"  this.mxmldd;\n" +
+        		"  \n" +
+        		"  /**\n" +
+        		"   * @private\n" +
+        		"   * @type {Array}\n" +
+        		"   */\n" +
+        		"  this.mxmldp;\n" +
+        		"};\n" +
+        		"goog.inherits(AppName, org.apache.royale.core.Application);\n" +
+          		"\n" +
+        		"\n" +
+        		"\n" +
 				"\n" +
 				"AppName.get__foo = function() {\n" +
 				"  var value = org.apache.royale.events.CloseEvent.CLOSE;\n" +
-				"  Object.defineProperty(AppName, 'foo', { value: value, writable: true });\n" +
+				"  Object.defineProperties(AppName, { foo: { value: value, writable: true }});\n" +
 				"  return value;\n" +
 				"};\n" +
 				"AppName.set__foo = function(value) {\n" +
-				"  Object.defineProperty(AppName, 'foo', { value: value, writable: true });\n" +
+				"  Object.defineProperties(AppName, { foo: { value: value, writable: true }});\n" +
 				"};\n" +
 				"/**\n" +
-				" * @export\n" +
 				" * @type {string}\n" +
 				" */\n" +
 				"AppName.foo;\n" +
 				"\n" +
 				"Object.defineProperties(AppName, /** @lends {AppName} */ {\n" +
 				"/**\n" +
-				" * @export\n" +
 				" * @type {string}\n" +
 				" */\n" +
 				"foo: {\n" +
@@ -501,15 +476,9 @@
         		"goog.inherits(AppName, org.apache.royale.core.Application);\n" +
           		"\n" +
         		"\n" +
-        		"/**\n" +
-        		" * Prevent renaming of class. Needed for reflection.\n" +
-        		" */\n" +
-        		"goog.exportSymbol('AppName', AppName);\n" +
-        		"\n" +
         		"\n" +
 				"\n" +
 				"/**\n" +
-				" * @export\n" +
 				" * @type {string}\n" +
 				" */\n" +
 				"AppName.foo = 'foo';\n" +
@@ -600,15 +569,9 @@
         		"goog.inherits(AppName, org.apache.royale.core.Application);\n" +
           		"\n" +
         		"\n" +
-        		"/**\n" +
-        		" * Prevent renaming of class. Needed for reflection.\n" +
-        		" */\n" +
-        		"goog.exportSymbol('AppName', AppName);\n" +
-        		"\n" +
         		"\n" +
 				"\n" +
 				"/**\n" +
-				" * @export\n" +
 				" * @type {Array}\n" +
 				" */\n" +
 				"AppName.foo = ['foo'];\n" +
@@ -665,56 +628,50 @@
         mxmlBlockWalker.visitDocument(dnode);
         String appName = dnode.getQualifiedName();
         String outTemplate = "/**\n" +
-				" * AppName\n" +
-				" *\n" +
-				" * @fileoverview\n" +
-				" *\n" +
-				" * @suppress {checkTypes|accessControls}\n" +
-				" */\n" +
-				"\n" +
-				"goog.provide('AppName');\n" +
-				"\n" +
-				"goog.require('org.apache.royale.core.Application');\n" +
-				"goog.require('org.apache.royale.events.CloseEvent');\n" +
-				"\n" +
-				"\n" +
-				"\n" +
-				"/**\n" +
-				" * @constructor\n" +
-				" * @extends {org.apache.royale.core.Application}\n" +
-				" */\n" +
-				"AppName = function() {\n" +
-				"  AppName.base(this, 'constructor');\n" +
-				"  \n" +
-				"  /**\n" +
-				"   * @private\n" +
-				"   * @type {Array}\n" +
-				"   */\n" +
-				"  this.mxmldd;\n" +
-				"  \n" +
-				"  /**\n" +
-				"   * @private\n" +
-				"   * @type {Array}\n" +
-				"   */\n" +
-				"  this.mxmldp;\n" +
-				"};\n" +
-				"goog.inherits(AppName, org.apache.royale.core.Application);\n" +
-				"\n" +
-				"\n" +
-				"/**\n" +
-				" * Prevent renaming of class. Needed for reflection.\n" +
-				" */\n" +
-				"goog.exportSymbol('AppName', AppName);\n" +
-				"\n" +
-				"\n" +
+        		" * AppName\n" +
+        		" *\n" +
+        		" * @fileoverview\n" +
+        		" *\n" +
+        		" * @suppress {checkTypes|accessControls}\n" +
+        		" */\n" +
+        		"\n" +
+        		"goog.provide('AppName');\n" +
+        		"\n" +
+        		"goog.require('org.apache.royale.core.Application');\n" +
+        		"goog.require('org.apache.royale.events.CloseEvent');\n" +
+        		"\n" +
+        		"\n" +
+        		"\n" +
+        		"/**\n" +
+        		" * @constructor\n" +
+        		" * @extends {org.apache.royale.core.Application}\n" +
+        		" */\n" +
+        		"AppName = function() {\n" +
+        		"  AppName.base(this, 'constructor');\n" +
+        		"  \n" +
+        		"  /**\n" +
+        		"   * @private\n" +
+        		"   * @type {Array}\n" +
+        		"   */\n" +
+        		"  this.mxmldd;\n" +
+        		"  \n" +
+        		"  /**\n" +
+        		"   * @private\n" +
+        		"   * @type {Array}\n" +
+        		"   */\n" +
+        		"  this.mxmldp;\n" +
+        		"};\n" +
+        		"goog.inherits(AppName, org.apache.royale.core.Application);\n" +
+          		"\n" +
+        		"\n" +
+        		"\n" +
 				"\n" +
 				"AppName.get__foo = function() {\n" +
 				"  var value = org.apache.royale.events.CloseEvent.CLOSE;\n" +
-				"  Object.defineProperty(AppName, 'foo', { value: value, writable: false });\n" +
+				"  Object.defineProperties(AppName, { foo: { value: value, writable: false }});\n" +
 				"  return value;\n" +
 				"};\n" +
 				"/**\n" +
-				" * @export\n" +
 				" * @const\n" +
 				" * @type {string}\n" +
 				" */\n" +
@@ -722,7 +679,6 @@
 				"\n" +
 				"Object.defineProperties(AppName, /** @lends {AppName} */ {\n" +
 				"/**\n" +
-				" * @export\n" +
 				" * @const\n" +
 				" * @type {string}\n" +
 				" */\n" +
@@ -814,11 +770,6 @@
         		"goog.inherits(AppName, org.apache.royale.core.Application);\n" +
           		"\n" +
         		"\n" +
-        		"/**\n" +
-        		" * Prevent renaming of class. Needed for reflection.\n" +
-        		" */\n" +
-        		"goog.exportSymbol('AppName', AppName);\n" +
-        		"\n" +
         		"\n" +
 				"\n" +
 				"//use namespace custom.custom_namespace;\n" +
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/mxml/sourcemaps/TestSourceMapMXMLEvents.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/mxml/sourcemaps/TestSourceMapMXMLEvents.java
index c937cd0..c5067fe 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/mxml/sourcemaps/TestSourceMapMXMLEvents.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/mxml/sourcemaps/TestSourceMapMXMLEvents.java
@@ -37,7 +37,7 @@
                 .getAncestorOfType(IMXMLDocumentNode.class);
         mxmlBlockWalker.walk(dnode);
         ///event
-        assertMapping(node, 0, 6, 79, 2, 79, 7);  // event
+        assertMapping(node, 0, 6, 74, 2, 74, 7);  // event
         //the start column in the ActionScript seems to be outside the quote
         //instead of inside. that seems like a bug. -JT
     }
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/mxml/sourcemaps/TestSourceMapMXMLScript.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/mxml/sourcemaps/TestSourceMapMXMLScript.java
index d449174..6416831 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/mxml/sourcemaps/TestSourceMapMXMLScript.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/mxml/sourcemaps/TestSourceMapMXMLScript.java
@@ -44,8 +44,8 @@
         String definitionName = definition.getQualifiedName();
         assertTrue(definitionName.startsWith(getClass().getSimpleName()));
         int endColumn = definitionName.length() + 14;
-        ///**\n * @export\n * @type {*}\n */\nRoyaleTest_A.prototype.foo
-        assertMapping(node, 0, 4, 47, 0, 47, endColumn);  // foo
+        ///**\n * @package\n * @type {*}\n */\nRoyaleTest_A.prototype.foo
+        assertMapping(node, 0, 4, 43, 0, 43, endColumn);  // foo
     }
 
     @Test
@@ -63,11 +63,11 @@
         assertTrue(definitionName.startsWith(getClass().getSimpleName()));
         int nameEndColumn = definitionName.length() + 14;
         ///**\n * @export\n * @type {*}\n */\nRoyaleTest_A.prototype.foo
-        assertMapping(node, 0, 9, 44, 0, 44, nameEndColumn);  // foo
-        assertMapping(node, 0, 0, 44, nameEndColumn, 44, nameEndColumn + 11);  // = function
-        assertMapping(node, 0, 12, 44, nameEndColumn + 11, 44, nameEndColumn + 12);  // (
-        assertMapping(node, 0, 13, 44, nameEndColumn + 12, 44, nameEndColumn + 13);  // )
-        assertMapping(node, 0, 14, 44, nameEndColumn + 14, 44, nameEndColumn + 15);  // {
-        assertMapping(node, 0, 15, 45, 0, 45, 1);  // }
+        assertMapping(node, 0, 9, 39, 0, 39, nameEndColumn);  // foo
+        assertMapping(node, 0, 0, 39, nameEndColumn, 39, nameEndColumn + 11);  // = function
+        assertMapping(node, 0, 12, 39, nameEndColumn + 11, 39, nameEndColumn + 12);  // (
+        assertMapping(node, 0, 13, 39, nameEndColumn + 12, 39, nameEndColumn + 13);  // )
+        assertMapping(node, 0, 14, 39, nameEndColumn + 14, 39, nameEndColumn + 15);  // {
+        assertMapping(node, 0, 15, 40, 0, 40, 1);  // }
     }
 }
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/test/RoyaleTestBase.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/test/RoyaleTestBase.java
index cf25d58..e3a7a59 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/test/RoyaleTestBase.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/test/RoyaleTestBase.java
@@ -26,7 +26,9 @@
 import org.apache.royale.compiler.driver.IBackend;
 import org.apache.royale.compiler.internal.as.codegen.BindableHelper;
 import org.apache.royale.compiler.internal.driver.mxml.royale.MXMLRoyaleBackend;
+import org.apache.royale.compiler.internal.mxml.MXMLNamespaceMapping;
 import org.apache.royale.compiler.internal.projects.RoyaleJSProject;
+import org.apache.royale.compiler.mxml.IMXMLNamespaceMapping;
 import org.apache.royale.compiler.tree.as.IASNode;
 import org.apache.royale.compiler.tree.mxml.IMXMLFileNode;
 import org.apache.royale.compiler.tree.mxml.IMXMLNode;
@@ -59,6 +61,17 @@
     }
 
     @Override
+    protected void addNamespaceMappings(
+            List<IMXMLNamespaceMapping> namespaceMappings)
+    {
+        namespaceMappings.add(new MXMLNamespaceMapping(
+                "http://ns.adobe.com/mxml/2009",
+                FilenameNormalization.normalize("../compiler/src/test/resources/mxml-2009-manifest.xml")));
+
+        super.addNamespaceMappings(namespaceMappings);
+    }
+
+    @Override
     protected void addLibraries(List<File> libraries)
     {
         libraries.add(new File(FilenameNormalization.normalize(env.FPSDK
diff --git a/compiler-jx/src/test/resources/royale/files/LocalFunction_result.js b/compiler-jx/src/test/resources/royale/files/LocalFunction_result.js
index d5c832f..7a2df4b 100644
--- a/compiler-jx/src/test/resources/royale/files/LocalFunction_result.js
+++ b/compiler-jx/src/test/resources/royale/files/LocalFunction_result.js
@@ -31,12 +31,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('LocalFunction', LocalFunction);
-
-
-/**
  * @private
  * @type {string}
  */
@@ -57,7 +51,6 @@
 
 
 /**
- * @export
  */
 LocalFunction.prototype.doIt = function() {
   this.myMemberMethod(624);
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 ff557ad..95dba6f 100644
--- a/compiler-jx/src/test/resources/royale/files/MyInitialView_result.js
+++ b/compiler-jx/src/test/resources/royale/files/MyInitialView_result.js
@@ -57,19 +57,19 @@
    * @private
    * @type {org.apache.royale.binding.SimpleBinding}
    */
-  this.$ID0_;
+  this.$ID_11_0;
   
   /**
    * @private
    * @type {org.apache.royale.html.TextButton}
    */
-  this.$ID1_;
+  this.$ID_11_1;
   
   /**
    * @private
    * @type {org.apache.royale.html.TextButton}
    */
-  this.$ID2_;
+  this.$ID_11_2;
   
   /**
    * @private
@@ -87,19 +87,19 @@
    * @private
    * @type {org.apache.royale.binding.ConstantBinding}
    */
-  this.$ID3_;
+  this.$ID_11_3;
   
   /**
    * @private
    * @type {org.apache.royale.html.TextArea}
    */
-  this.$ID5_;
+  this.$ID_11_5;
   
   /**
    * @private
    * @type {org.apache.royale.binding.SimpleBinding}
    */
-  this.$ID4_;
+  this.$ID_11_4;
   
   /**
    * @private
@@ -111,7 +111,7 @@
    * @private
    * @type {org.apache.royale.html.TextButton}
    */
-  this.$ID6_;
+  this.$ID_11_6;
   
   /**
    * @private
@@ -123,37 +123,37 @@
    * @private
    * @type {org.apache.royale.html.RadioButton}
    */
-  this.$ID7_;
+  this.$ID_11_7;
   
   /**
    * @private
    * @type {org.apache.royale.html.RadioButton}
    */
-  this.$ID8_;
+  this.$ID_11_8;
   
   /**
    * @private
    * @type {org.apache.royale.html.RadioButton}
    */
-  this.$ID9_;
+  this.$ID_11_9;
   
   /**
    * @private
    * @type {org.apache.royale.html.RadioButton}
    */
-  this.$ID10_;
+  this.$ID_11_10;
   
   /**
    * @private
    * @type {org.apache.royale.html.RadioButton}
    */
-  this.$ID11_;
+  this.$ID_11_11;
   
   /**
    * @private
    * @type {org.apache.royale.html.RadioButton}
    */
-  this.$ID12_;
+  this.$ID_11_12;
   
   /**
    * @private
@@ -165,13 +165,13 @@
    * @private
    * @type {org.apache.royale.binding.ConstantBinding}
    */
-  this.$ID13_;
+  this.$ID_11_13;
   
   /**
    * @private
    * @type {org.apache.royale.html.TextButton}
    */
-  this.$ID14_;
+  this.$ID_11_14;
   
   /**
    * @private
@@ -183,7 +183,7 @@
    * @private
    * @type {org.apache.royale.binding.ConstantBinding}
    */
-  this.$ID15_;
+  this.$ID_11_15;
   
   /**
    * @private
@@ -200,11 +200,6 @@
 goog.inherits(MyInitialView, org.apache.royale.core.View);
 
 
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('MyInitialView', MyInitialView);
-
 
 
 /**
@@ -227,7 +222,6 @@
 
 
 /**
- * @export
  */
 MyInitialView.prototype.startTimer = function() {
   this.timer = new org.apache.royale.utils.Timer(1000);
@@ -237,7 +231,6 @@
 
 
 /**
- * @export
  * @param {org.apache.royale.events.Event} event
  */
 MyInitialView.prototype.timerHandler = function(event) {
@@ -248,21 +241,53 @@
 
 
 
+/**
+ * @nocollapse
+ * @export
+ * @type {string}
+ */
+MyInitialView.prototype.symbol;
+
+
 MyInitialView.prototype.get__symbol = function() {
   return org.apache.royale.utils.Language.as(this.list.selectedItem, String);
 };
 
 
+/**
+ * @nocollapse
+ * @export
+ * @type {string}
+ */
+MyInitialView.prototype.city;
+
+
 MyInitialView.prototype.get__city = function() {
   return org.apache.royale.utils.Language.as(this.cityList.selectedItem, String);
 };
 
 
+/**
+ * @nocollapse
+ * @export
+ * @type {string}
+ */
+MyInitialView.prototype.inputText;
+
+
 MyInitialView.prototype.get__inputText = function() {
   return this.input.text;
 };
 
 
+/**
+ * @nocollapse
+ * @export
+ * @type {string}
+ */
+MyInitialView.prototype.comboBoxValue;
+
+
 MyInitialView.prototype.get__comboBoxValue = function() {
   return String(this.comboBox.selectedItem);
 };
@@ -270,30 +295,30 @@
 
 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}}
 );/**
  * @export
  * @param {org.apache.royale.events.MouseEvent} event
  */
-MyInitialView.prototype.$EH0 = function(event)
+MyInitialView.prototype.$EH_11_0 = function(event)
 {
   this.startTimer();
 };
@@ -303,7 +328,7 @@
  * @export
  * @param {org.apache.royale.events.MouseEvent} event
  */
-MyInitialView.prototype.$EH1 = function(event)
+MyInitialView.prototype.$EH_11_1 = function(event)
 {
   this.timer.removeEventListener('timer', org.apache.royale.utils.Language.closure(this.timerHandler, this, 'timerHandler'));
   this.timer.stop();
@@ -314,7 +339,7 @@
  * @export
  * @param {org.apache.royale.events.Event} event
  */
-MyInitialView.prototype.$EH2 = function(event)
+MyInitialView.prototype.$EH_11_2 = function(event)
 {
   this.dispatchEvent(new org.apache.royale.events.CustomEvent('cityListChanged'));
 };
@@ -324,7 +349,7 @@
  * @export
  * @param {org.apache.royale.events.MouseEvent} event
  */
-MyInitialView.prototype.$EH3 = function(event)
+MyInitialView.prototype.$EH_11_3 = function(event)
 {
   this.dispatchEvent(new org.apache.royale.events.CustomEvent('transferClicked'));
 };
@@ -334,7 +359,7 @@
  * @export
  * @param {org.apache.royale.events.Event} event
  */
-MyInitialView.prototype.$EH4 = function(event)
+MyInitialView.prototype.$EH_11_4 = function(event)
 {
   this.dispatchEvent(new org.apache.royale.events.CustomEvent('listChanged'));
 };
@@ -344,7 +369,7 @@
  * @export
  * @param {org.apache.royale.events.MouseEvent} event
  */
-MyInitialView.prototype.$EH5 = function(event)
+MyInitialView.prototype.$EH_11_5 = function(event)
 {
   this.dispatchEvent(new org.apache.royale.events.CustomEvent('buttonClicked'));
 };
@@ -354,15 +379,14 @@
  * @export
  * @param {org.apache.royale.events.Event} event
  */
-MyInitialView.prototype.$EH6 = function(event)
+MyInitialView.prototype.$EH_11_6 = function(event)
 {
   this.dispatchEvent(new org.apache.royale.events.CustomEvent('comboBoxChanged'));
 };
 
 
 Object.defineProperties(MyInitialView.prototype, /** @lends {MyInitialView.prototype} */ {
-/** @export */
-    lbl: {
+  lbl: {
     /** @this {MyInitialView} */
     get: function() {
       return this.lbl_;
@@ -375,8 +399,7 @@
       }
     }
   },
-  /** @export */
-    timerLabel: {
+  timerLabel: {
     /** @this {MyInitialView} */
     get: function() {
       return this.timerLabel_;
@@ -389,8 +412,7 @@
       }
     }
   },
-  /** @export */
-    cityList: {
+  cityList: {
     /** @this {MyInitialView} */
     get: function() {
       return this.cityList_;
@@ -403,8 +425,7 @@
       }
     }
   },
-  /** @export */
-    input: {
+  input: {
     /** @this {MyInitialView} */
     get: function() {
       return this.input_;
@@ -417,8 +438,7 @@
       }
     }
   },
-  /** @export */
-    checkbox: {
+  checkbox: {
     /** @this {MyInitialView} */
     get: function() {
       return this.checkbox_;
@@ -431,8 +451,7 @@
       }
     }
   },
-  /** @export */
-    list: {
+  list: {
     /** @this {MyInitialView} */
     get: function() {
       return this.list_;
@@ -445,8 +464,7 @@
       }
     }
   },
-  /** @export */
-    comboBox: {
+  comboBox: {
     /** @this {MyInitialView} */
     get: function() {
       return this.comboBox_;
@@ -467,7 +485,7 @@
         /** @type {Array} */
         var arr = MyInitialView.superClass_.get__MXMLDescriptor.apply(this);
         /** @type {Array} */
-        var data = [
+        var mxmldd = [
           org.apache.royale.html.Label,
           4,
           'id',
@@ -486,7 +504,7 @@
             5,
             '_id',
             true,
-            '$ID0',
+            '$ID_11_0',
             'eventName',
             true,
             'labelTextChanged',
@@ -510,7 +528,7 @@
           4,
           '_id',
           true,
-          '$ID1',
+          '$ID_11_1',
           'text',
           true,
           'Let\'s Start Timer',
@@ -523,13 +541,13 @@
           0,
           1,
           'click',
-this.$EH0,
+          this.$EH_11_0,
           null,
           org.apache.royale.html.TextButton,
           4,
           '_id',
           true,
-          '$ID2',
+          '$ID_11_2',
           'text',
           true,
           'Stop Timer',
@@ -542,7 +560,7 @@
           0,
           1,
           'click',
-this.$EH1,
+          this.$EH_11_1,
           null,
           org.apache.royale.html.Label,
           3,
@@ -582,7 +600,7 @@
             4,
             '_id',
             true,
-            '$ID3',
+            '$ID_11_3',
             'sourceID',
             true,
             'applicationModel',
@@ -599,13 +617,13 @@
           0,
           1,
           'change',
-this.$EH2,
+          this.$EH_11_2,
           null,
           org.apache.royale.html.TextArea,
           6,
           '_id',
           true,
-          '$ID5',
+          '$ID_11_5',
           'x',
           true,
           320,
@@ -625,7 +643,7 @@
             5,
             '_id',
             true,
-            '$ID4',
+            '$ID_11_4',
             'eventName',
             true,
             'labelTextChanged',
@@ -663,7 +681,7 @@
           4,
           '_id',
           true,
-          '$ID6',
+          '$ID_11_6',
           'text',
           true,
           'Transfer',
@@ -676,7 +694,7 @@
           0,
           1,
           'click',
-this.$EH3,
+          this.$EH_11_3,
           null,
           org.apache.royale.html.CheckBox,
           4,
@@ -699,7 +717,7 @@
           6,
           '_id',
           true,
-          '$ID7',
+          '$ID_11_7',
           'groupName',
           true,
           'group1',
@@ -722,7 +740,7 @@
           7,
           '_id',
           true,
-          '$ID8',
+          '$ID_11_8',
           'groupName',
           true,
           'group1',
@@ -748,7 +766,7 @@
           6,
           '_id',
           true,
-          '$ID9',
+          '$ID_11_9',
           'groupName',
           true,
           'group1',
@@ -771,7 +789,7 @@
           7,
           '_id',
           true,
-          '$ID10',
+          '$ID_11_10',
           'groupName',
           true,
           'group2',
@@ -797,7 +815,7 @@
           6,
           '_id',
           true,
-          '$ID11',
+          '$ID_11_11',
           'groupName',
           true,
           'group2',
@@ -820,7 +838,7 @@
           6,
           '_id',
           true,
-          '$ID12',
+          '$ID_11_12',
           'groupName',
           true,
           'group2',
@@ -863,7 +881,7 @@
             4,
             '_id',
             true,
-            '$ID13',
+            '$ID_11_13',
             'sourceID',
             true,
             'applicationModel',
@@ -880,13 +898,13 @@
           0,
           1,
           'change',
-this.$EH4,
+          this.$EH_11_4,
           null,
           org.apache.royale.html.TextButton,
           4,
           '_id',
           true,
-          '$ID14',
+          '$ID_11_14',
           'text',
           true,
           'OK',
@@ -899,7 +917,7 @@
           0,
           1,
           'click',
-this.$EH5,
+          this.$EH_11_5,
           null,
           org.apache.royale.html.ComboBox,
           5,
@@ -922,7 +940,7 @@
             4,
             '_id',
             true,
-            '$ID15',
+            '$ID_11_15',
             'sourceID',
             true,
             'applicationModel',
@@ -939,13 +957,13 @@
           0,
           1,
           'change',
-this.$EH6,
+          this.$EH_11_6,
           null
         ];
         if (arr)
-          this.mxmldd = arr.concat(data);
+          this.mxmldd = arr.concat(mxmldd);
         else
-          this.mxmldd = data;
+          this.mxmldd = mxmldd;
       }
       return this.mxmldd;
     }
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 78c68fb..c930caa 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
@@ -45,25 +45,25 @@
    * @private
    * @type {org.apache.royale.core.SimpleCSSValuesImpl}
    */
-  this.$ID0_;
+  this.$ID_8_0;
   
   /**
    * @private
    * @type {MyInitialView}
    */
-  this.$ID1_;
+  this.$ID_8_1;
   
   /**
    * @private
    * @type {models.MyModel}
    */
-  this.$ID2_;
+  this.$ID_8_2;
   
   /**
    * @private
    * @type {controllers.MyController}
    */
-  this.$ID3_;
+  this.$ID_8_3;
   
   /**
    * @private
@@ -81,13 +81,13 @@
    * @private
    * @type {org.apache.royale.collections.parsers.JSONInputParser}
    */
-  this.$ID4_;
+  this.$ID_8_4;
   
   /**
    * @private
    * @type {StockDataJSONItemConverter}
    */
-  this.$ID5_;
+  this.$ID_8_5;
   
   /**
    * @private
@@ -110,7 +110,7 @@
       1,
       '_id',
       true,
-      '$ID2',
+      '$ID_8_2',
       0,
       0,
       null
@@ -122,7 +122,7 @@
       1,
       '_id',
       true,
-      '$ID0',
+      '$ID_8_0',
       0,
       0,
       null
@@ -134,7 +134,7 @@
       1,
       '_id',
       true,
-      '$ID1',
+      '$ID_8_1',
       0,
       0,
       null
@@ -146,7 +146,7 @@
       1,
       '_id',
       true,
-      '$ID3',
+      '$ID_8_3',
       0,
       0,
       null
@@ -174,7 +174,7 @@
           1,
           '_id',
           true,
-          '$ID4',
+          '$ID_8_4',
           0,
           0,
           null
@@ -186,7 +186,7 @@
           1,
           '_id',
           true,
-          '$ID5',
+          '$ID_8_5',
           0,
           0,
           null
@@ -202,33 +202,27 @@
     0,
     1,
     'initialize',
-this.$EH0
+    this.$EH_8_0
   ]);
   
 };
 goog.inherits(RoyaleTest_again, org.apache.royale.core.Application);
 
 
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('RoyaleTest_again', RoyaleTest_again);
-
 
 
 /**
  * @export
  * @param {org.apache.royale.events.Event} event
  */
-RoyaleTest_again.prototype.$EH0 = function(event)
+RoyaleTest_again.prototype.$EH_8_0 = function(event)
 {
   org.apache.royale.utils.Language.as(this.model, models.MyModel, true).labelText = 'Hello World';
 };
 
 
 Object.defineProperties(RoyaleTest_again.prototype, /** @lends {RoyaleTest_again.prototype} */ {
-/** @export */
-    service: {
+  service: {
     /** @this {RoyaleTest_again} */
     get: function() {
       return this.service_;
@@ -241,8 +235,7 @@
       }
     }
   },
-  /** @export */
-    collection: {
+  collection: {
     /** @this {RoyaleTest_again} */
     get: function() {
       return this.collection_;
diff --git a/compiler-jx/src/test/resources/royale/files/controllers/MyController_result.js b/compiler-jx/src/test/resources/royale/files/controllers/MyController_result.js
index ed437af..63783c3 100644
--- a/compiler-jx/src/test/resources/royale/files/controllers/MyController_result.js
+++ b/compiler-jx/src/test/resources/royale/files/controllers/MyController_result.js
@@ -46,12 +46,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('controllers.MyController', controllers.MyController);
-
-
-/**
  * @private
  * @type {string}
  */
@@ -143,7 +137,6 @@
 
 
 /**
- * @export
  * @param {Object} document
  * @param {string=} id
  */
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 e6be50d..98a73a9 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
@@ -40,12 +40,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('models.MyModel', models.MyModel);
-
-
-/**
  * @private
  * @type {string}
  */
@@ -66,6 +60,14 @@
 models.MyModel.prototype._cities = null;
 
 
+/**
+ * @nocollapse
+ * @export
+ * @type {string}
+ */
+models.MyModel.prototype.labelText;
+
+
 models.MyModel.prototype.get__labelText = function() {
   return this._labelText;
 };
@@ -79,11 +81,27 @@
 };
 
 
+/**
+ * @nocollapse
+ * @export
+ * @type {Array}
+ */
+models.MyModel.prototype.strings;
+
+
 models.MyModel.prototype.get__strings = function() {
   return this._strings;
 };
 
 
+/**
+ * @nocollapse
+ * @export
+ * @type {Array}
+ */
+models.MyModel.prototype.cities;
+
+
 models.MyModel.prototype.get__cities = function() {
   return this._cities;
 };
@@ -91,19 +109,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/files/wildcard_import_result.js b/compiler-jx/src/test/resources/royale/files/wildcard_import_result.js
index a841e31..5d2f8c2 100644
--- a/compiler-jx/src/test/resources/royale/files/wildcard_import_result.js
+++ b/compiler-jx/src/test/resources/royale/files/wildcard_import_result.js
@@ -48,11 +48,6 @@
 goog.inherits(wildcard_import, org.apache.royale.core.Application);
 
 
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('wildcard_import', wildcard_import);
-
 
 
 /**
diff --git a/compiler-jx/src/test/resources/royale/projects/bad_overrides/Test_result.js b/compiler-jx/src/test/resources/royale/projects/bad_overrides/Test_result.js
index 1a6f4d8..9ece63f 100644
--- a/compiler-jx/src/test/resources/royale/projects/bad_overrides/Test_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/bad_overrides/Test_result.js
@@ -36,12 +36,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('Test', Test);
-
-
-/**
  * @export
  * @override
  */
diff --git a/compiler-jx/src/test/resources/royale/projects/bad_overrides/classes/A_result.js b/compiler-jx/src/test/resources/royale/projects/bad_overrides/classes/A_result.js
index 8dc18ff..9821355 100644
--- a/compiler-jx/src/test/resources/royale/projects/bad_overrides/classes/A_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/bad_overrides/classes/A_result.js
@@ -36,12 +36,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('classes.A', classes.A);
-
-
-/**
  * @export
  * @return {classes.B}
  */
diff --git a/compiler-jx/src/test/resources/royale/projects/bad_overrides/classes/B_result.js b/compiler-jx/src/test/resources/royale/projects/bad_overrides/classes/B_result.js
index 42e6b64..838ebbb 100644
--- a/compiler-jx/src/test/resources/royale/projects/bad_overrides/classes/B_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/bad_overrides/classes/B_result.js
@@ -31,12 +31,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('classes.B', classes.B);
-
-
-/**
  * Metadata
  *
  * @type {Object.<string, Array.<Object>>}
diff --git a/compiler-jx/src/test/resources/royale/projects/bad_overrides/classes/C_result.js b/compiler-jx/src/test/resources/royale/projects/bad_overrides/classes/C_result.js
index 40feccb..75b2958 100644
--- a/compiler-jx/src/test/resources/royale/projects/bad_overrides/classes/C_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/bad_overrides/classes/C_result.js
@@ -31,12 +31,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('classes.C', classes.C);
-
-
-/**
  * Metadata
  *
  * @type {Object.<string, Array.<Object>>}
diff --git a/compiler-jx/src/test/resources/royale/projects/bad_overrides/interfaces/IA_result.js b/compiler-jx/src/test/resources/royale/projects/bad_overrides/interfaces/IA_result.js
index d6896fe..c387ada 100644
--- a/compiler-jx/src/test/resources/royale/projects/bad_overrides/interfaces/IA_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/bad_overrides/interfaces/IA_result.js
@@ -31,12 +31,6 @@
  */
 interfaces.IA = function() {
 };
-
-
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('interfaces.ID', interfaces.IA);
 interfaces.IA.prototype.someFunction = function() {
 };
 interfaces.IA.prototype.someOtherFunction = function() {
diff --git a/compiler-jx/src/test/resources/royale/projects/bad_overrides/interfaces/IB_result.js b/compiler-jx/src/test/resources/royale/projects/bad_overrides/interfaces/IB_result.js
index 702fb60..ab5dcca 100644
--- a/compiler-jx/src/test/resources/royale/projects/bad_overrides/interfaces/IB_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/bad_overrides/interfaces/IB_result.js
@@ -31,12 +31,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('interfaces.IB', interfaces.IB);
-
-
-/**
  * Metadata
  *
  * @type {Object.<string, Array.<Object>>}
diff --git a/compiler-jx/src/test/resources/royale/projects/bad_overrides/interfaces/IC_result.js b/compiler-jx/src/test/resources/royale/projects/bad_overrides/interfaces/IC_result.js
index 819394a..8228c9e 100644
--- a/compiler-jx/src/test/resources/royale/projects/bad_overrides/interfaces/IC_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/bad_overrides/interfaces/IC_result.js
@@ -31,12 +31,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('interfaces.IC', interfaces.IC);
-
-
-/**
  * Metadata
  *
  * @type {Object.<string, Array.<Object>>}
diff --git a/compiler-jx/src/test/resources/royale/projects/circular/Base_result.js b/compiler-jx/src/test/resources/royale/projects/circular/Base_result.js
index 56f6ab2..7d16e91 100644
--- a/compiler-jx/src/test/resources/royale/projects/circular/Base_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/circular/Base_result.js
@@ -36,12 +36,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('Base', Base);
-
-
-/**
  * Metadata
  *
  * @type {Object.<string, Array.<Object>>}
diff --git a/compiler-jx/src/test/resources/royale/projects/circular/Super_result.js b/compiler-jx/src/test/resources/royale/projects/circular/Super_result.js
index df530bb..8ae26de 100644
--- a/compiler-jx/src/test/resources/royale/projects/circular/Super_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/circular/Super_result.js
@@ -33,12 +33,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('Super', Super);
-
-
-/**
  * @private
  * @type {Base}
  */
diff --git a/compiler-jx/src/test/resources/royale/projects/circular_proto/A_result.js b/compiler-jx/src/test/resources/royale/projects/circular_proto/A_result.js
index 87271a0..2bf4522 100644
--- a/compiler-jx/src/test/resources/royale/projects/circular_proto/A_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/circular_proto/A_result.js
@@ -34,12 +34,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('A', A);
-
-
-/**
  * @private
  */
 A.prototype.test = function() {
diff --git a/compiler-jx/src/test/resources/royale/projects/circular_proto/B_result.js b/compiler-jx/src/test/resources/royale/projects/circular_proto/B_result.js
index f5a1b1a..ad219ea 100644
--- a/compiler-jx/src/test/resources/royale/projects/circular_proto/B_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/circular_proto/B_result.js
@@ -33,12 +33,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('B', B);
-
-
-/**
  * @export
  * @param {boolean} b
  * @return {number}
diff --git a/compiler-jx/src/test/resources/royale/projects/circular_proto/C_result.js b/compiler-jx/src/test/resources/royale/projects/circular_proto/C_result.js
index ea9f1e3..ae8fa8c 100644
--- a/compiler-jx/src/test/resources/royale/projects/circular_proto/C_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/circular_proto/C_result.js
@@ -37,12 +37,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('C', C);
-
-
-/**
  * @export
  * @param {boolean} b
  * @return {number}
diff --git a/compiler-jx/src/test/resources/royale/projects/circular_proto/D_result.js b/compiler-jx/src/test/resources/royale/projects/circular_proto/D_result.js
index b6bfeee..584aa2e 100644
--- a/compiler-jx/src/test/resources/royale/projects/circular_proto/D_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/circular_proto/D_result.js
@@ -37,12 +37,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('D', D);
-
-
-/**
  * @export
  * @param {boolean} b
  * @return {number}
diff --git a/compiler-jx/src/test/resources/royale/projects/circular_proto/E_result.js b/compiler-jx/src/test/resources/royale/projects/circular_proto/E_result.js
index 688d5c4..33abf6f 100644
--- a/compiler-jx/src/test/resources/royale/projects/circular_proto/E_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/circular_proto/E_result.js
@@ -33,12 +33,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('E', E);
-
-
-/**
  * @export
  * @param {boolean} b
  * @return {number}
diff --git a/compiler-jx/src/test/resources/royale/projects/circular_proto/F_result.js b/compiler-jx/src/test/resources/royale/projects/circular_proto/F_result.js
index 5be3299..b6d8f61 100644
--- a/compiler-jx/src/test/resources/royale/projects/circular_proto/F_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/circular_proto/F_result.js
@@ -37,12 +37,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('F', F);
-
-
-/**
  * @export
  * @param {boolean} b
  * @return {number}
diff --git a/compiler-jx/src/test/resources/royale/projects/interfaces/Test_result.js b/compiler-jx/src/test/resources/royale/projects/interfaces/Test_result.js
index f9cf4c8..908da75 100644
--- a/compiler-jx/src/test/resources/royale/projects/interfaces/Test_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/interfaces/Test_result.js
@@ -43,13 +43,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('Test', Test);
-
-
-/**
- * @export
  * @param {interfaces.IC} ic
  * @return {interfaces.IC}
  */
diff --git a/compiler-jx/src/test/resources/royale/projects/interfaces/classes/A_result.js b/compiler-jx/src/test/resources/royale/projects/interfaces/classes/A_result.js
index d32bf18..da8e3db 100644
--- a/compiler-jx/src/test/resources/royale/projects/interfaces/classes/A_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/interfaces/classes/A_result.js
@@ -36,12 +36,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('classes.A', classes.A);
-
-
-/**
  * Metadata
  *
  * @type {Object.<string, Array.<Object>>}
diff --git a/compiler-jx/src/test/resources/royale/projects/interfaces/classes/B_result.js b/compiler-jx/src/test/resources/royale/projects/interfaces/classes/B_result.js
index 274f1bf..7c5786a 100644
--- a/compiler-jx/src/test/resources/royale/projects/interfaces/classes/B_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/interfaces/classes/B_result.js
@@ -31,12 +31,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('classes.B', classes.B);
-
-
-/**
  * Metadata
  *
  * @type {Object.<string, Array.<Object>>}
diff --git a/compiler-jx/src/test/resources/royale/projects/interfaces/classes/C_result.js b/compiler-jx/src/test/resources/royale/projects/interfaces/classes/C_result.js
index 78125c2..050d0e2 100644
--- a/compiler-jx/src/test/resources/royale/projects/interfaces/classes/C_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/interfaces/classes/C_result.js
@@ -31,12 +31,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('classes.C', classes.C);
-
-
-/**
  * Metadata
  *
  * @type {Object.<string, Array.<Object>>}
diff --git a/compiler-jx/src/test/resources/royale/projects/interfaces/interfaces/IA_result.js b/compiler-jx/src/test/resources/royale/projects/interfaces/interfaces/IA_result.js
index 1873432..86a144a 100644
--- a/compiler-jx/src/test/resources/royale/projects/interfaces/interfaces/IA_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/interfaces/interfaces/IA_result.js
@@ -34,12 +34,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('interfaces.IA', interfaces.IA);
-
-
-/**
  * Metadata
  *
  * @type {Object.<string, Array.<Object>>}
diff --git a/compiler-jx/src/test/resources/royale/projects/interfaces/interfaces/IC_result.js b/compiler-jx/src/test/resources/royale/projects/interfaces/interfaces/IC_result.js
index 30f3376..2f05a3d 100644
--- a/compiler-jx/src/test/resources/royale/projects/interfaces/interfaces/IC_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/interfaces/interfaces/IC_result.js
@@ -34,12 +34,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('interfaces.IC', interfaces.IC);
-
-
-/**
  * Metadata
  *
  * @type {Object.<string, Array.<Object>>}
diff --git a/compiler-jx/src/test/resources/royale/projects/interfaces/interfaces/ID_result.js b/compiler-jx/src/test/resources/royale/projects/interfaces/interfaces/ID_result.js
index 02e09ea..3d67102 100644
--- a/compiler-jx/src/test/resources/royale/projects/interfaces/interfaces/ID_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/interfaces/interfaces/ID_result.js
@@ -31,12 +31,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('interfaces.ID', interfaces.ID);
-
-
-/**
  * Metadata
  *
  * @type {Object.<string, Array.<Object>>}
diff --git a/compiler-jx/src/test/resources/royale/projects/interfaces/interfaces/IE_result.js b/compiler-jx/src/test/resources/royale/projects/interfaces/interfaces/IE_result.js
index 3e57834..5cf0879 100644
--- a/compiler-jx/src/test/resources/royale/projects/interfaces/interfaces/IE_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/interfaces/interfaces/IE_result.js
@@ -28,12 +28,6 @@
  */
 interfaces.IE = function() {
 };
-
-
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('interfaces.IE', interfaces.IE);
 interfaces.IE.prototype.myMethod = function() {
 };
 /**  * @type {string}
diff --git a/compiler-jx/src/test/resources/royale/projects/internal/MainClass_result.js b/compiler-jx/src/test/resources/royale/projects/internal/MainClass_result.js
index 34c8332..52e26f7 100644
--- a/compiler-jx/src/test/resources/royale/projects/internal/MainClass_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/internal/MainClass_result.js
@@ -34,12 +34,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('MainClass', MainClass);
-
-
-/**
  * Metadata
  *
  * @type {Object.<string, Array.<Object>>}
@@ -79,13 +73,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('MainClass.InternalClass', MainClass.InternalClass);
-
-
-/**
- * @export
  * @type {OtherClass}
  */
 MainClass.InternalClass.prototype.foo = null;
diff --git a/compiler-jx/src/test/resources/royale/projects/internal/OtherClass_result.js b/compiler-jx/src/test/resources/royale/projects/internal/OtherClass_result.js
index 907d8af..cadd4bb 100644
--- a/compiler-jx/src/test/resources/royale/projects/internal/OtherClass_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/internal/OtherClass_result.js
@@ -31,12 +31,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('OtherClass', OtherClass);
-
-
-/**
  * Metadata
  *
  * @type {Object.<string, Array.<Object>>}
diff --git a/compiler-jx/src/test/resources/royale/projects/overrides/Test_result.js b/compiler-jx/src/test/resources/royale/projects/overrides/Test_result.js
index 7644fc4..f150314 100644
--- a/compiler-jx/src/test/resources/royale/projects/overrides/Test_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/overrides/Test_result.js
@@ -38,13 +38,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('Test', Test);
-
-
-/**
- * @export
  * @override
  */
 Test.prototype.someFunction = function() {
@@ -53,7 +46,6 @@
 
 
 /**
- * @export
  * @override
  */
 Test.prototype.someOtherFunction = function() {
diff --git a/compiler-jx/src/test/resources/royale/projects/overrides/classes/A_result.js b/compiler-jx/src/test/resources/royale/projects/overrides/classes/A_result.js
index 58ce110..edcaeb3 100644
--- a/compiler-jx/src/test/resources/royale/projects/overrides/classes/A_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/overrides/classes/A_result.js
@@ -36,13 +36,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('classes.A', classes.A);
-
-
-/**
- * @export
  * @return {classes.B}
  */
 classes.A.prototype.someFunction = function() {
@@ -51,7 +44,6 @@
 
 
 /**
- * @export
  * @return {interfaces.IB}
  */
 classes.A.prototype.someOtherFunction = function() {
diff --git a/compiler-jx/src/test/resources/royale/projects/overrides/classes/B_result.js b/compiler-jx/src/test/resources/royale/projects/overrides/classes/B_result.js
index 274f1bf..7c5786a 100644
--- a/compiler-jx/src/test/resources/royale/projects/overrides/classes/B_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/overrides/classes/B_result.js
@@ -31,12 +31,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('classes.B', classes.B);
-
-
-/**
  * Metadata
  *
  * @type {Object.<string, Array.<Object>>}
diff --git a/compiler-jx/src/test/resources/royale/projects/overrides/classes/C_result.js b/compiler-jx/src/test/resources/royale/projects/overrides/classes/C_result.js
index 4a75910..f237bb9 100644
--- a/compiler-jx/src/test/resources/royale/projects/overrides/classes/C_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/overrides/classes/C_result.js
@@ -36,12 +36,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('classes.C', classes.C);
-
-
-/**
  * Metadata
  *
  * @type {Object.<string, Array.<Object>>}
diff --git a/compiler-jx/src/test/resources/royale/projects/overrides/interfaces/IA_result.js b/compiler-jx/src/test/resources/royale/projects/overrides/interfaces/IA_result.js
index 43ca268..f14ec2f 100644
--- a/compiler-jx/src/test/resources/royale/projects/overrides/interfaces/IA_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/overrides/interfaces/IA_result.js
@@ -31,20 +31,12 @@
  */
 interfaces.IA = function() {
 };
-
-
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('interfaces.IA', interfaces.IA);
-/**
- * @export
  * @return {classes.B}
  */
 interfaces.IA.prototype.someFunction = function() {
 };
 /**
- * @export
  * @return {interfaces.IB}
  */
 interfaces.IA.prototype.someOtherFunction = function() {
diff --git a/compiler-jx/src/test/resources/royale/projects/overrides/interfaces/IB_result.js b/compiler-jx/src/test/resources/royale/projects/overrides/interfaces/IB_result.js
index 55cb770..37d0d58 100644
--- a/compiler-jx/src/test/resources/royale/projects/overrides/interfaces/IB_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/overrides/interfaces/IB_result.js
@@ -31,12 +31,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('interfaces.IB', interfaces.IB);
-
-
-/**
  * Metadata
  *
  * @type {Object.<string, Array.<Object>>}
diff --git a/compiler-jx/src/test/resources/royale/projects/overrides/interfaces/IC_result.js b/compiler-jx/src/test/resources/royale/projects/overrides/interfaces/IC_result.js
index 958451b..f61ff09 100644
--- a/compiler-jx/src/test/resources/royale/projects/overrides/interfaces/IC_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/overrides/interfaces/IC_result.js
@@ -34,12 +34,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('interfaces.IC', interfaces.IC);
-
-
-/**
  * Metadata
  *
  * @type {Object.<string, Array.<Object>>}
diff --git a/compiler-jx/src/test/resources/royale/projects/package_conflicts_different_package_as_conflict/DifferentPackageAsConflict_result.js b/compiler-jx/src/test/resources/royale/projects/package_conflicts_different_package_as_conflict/DifferentPackageAsConflict_result.js
index 0f2a958..48da335 100644
--- a/compiler-jx/src/test/resources/royale/projects/package_conflicts_different_package_as_conflict/DifferentPackageAsConflict_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/package_conflicts_different_package_as_conflict/DifferentPackageAsConflict_result.js
@@ -34,12 +34,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('DifferentPackageAsConflict', DifferentPackageAsConflict);
-
-
-/**
  * @private
  * @type {mypackage.TestClass}
  */
diff --git a/compiler-jx/src/test/resources/royale/projects/package_conflicts_different_package_as_conflict/Event_result.js b/compiler-jx/src/test/resources/royale/projects/package_conflicts_different_package_as_conflict/Event_result.js
index 66a991c..c7afd93 100644
--- a/compiler-jx/src/test/resources/royale/projects/package_conflicts_different_package_as_conflict/Event_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/package_conflicts_different_package_as_conflict/Event_result.js
@@ -32,12 +32,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('Event', Event);
-
-
-/**
  * Metadata
  *
  * @type {Object.<string, Array.<Object>>}
diff --git a/compiler-jx/src/test/resources/royale/projects/package_conflicts_different_package_as_conflict/mypackage/TestClass_result.js b/compiler-jx/src/test/resources/royale/projects/package_conflicts_different_package_as_conflict/mypackage/TestClass_result.js
index 2fb9de0..dd079b3 100644
--- a/compiler-jx/src/test/resources/royale/projects/package_conflicts_different_package_as_conflict/mypackage/TestClass_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/package_conflicts_different_package_as_conflict/mypackage/TestClass_result.js
@@ -36,12 +36,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('mypackage.TestClass', mypackage.TestClass);
-
-
-/**
  * @private
  * @type {otherpackage.Event}
  */
diff --git a/compiler-jx/src/test/resources/royale/projects/package_conflicts_different_package_as_conflict/otherpackage/Event_result.js b/compiler-jx/src/test/resources/royale/projects/package_conflicts_different_package_as_conflict/otherpackage/Event_result.js
index a9df84a..097c752 100644
--- a/compiler-jx/src/test/resources/royale/projects/package_conflicts_different_package_as_conflict/otherpackage/Event_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/package_conflicts_different_package_as_conflict/otherpackage/Event_result.js
@@ -32,12 +32,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('otherpackage.Event', otherpackage.Event);
-
-
-/**
  * Metadata
  *
  * @type {Object.<string, Array.<Object>>}
diff --git a/compiler-jx/src/test/resources/royale/projects/package_conflicts_no_conflict_no_window/Event_result.js b/compiler-jx/src/test/resources/royale/projects/package_conflicts_no_conflict_no_window/Event_result.js
index da797cb..f19785c 100644
--- a/compiler-jx/src/test/resources/royale/projects/package_conflicts_no_conflict_no_window/Event_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/package_conflicts_no_conflict_no_window/Event_result.js
@@ -31,12 +31,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('Event', Event);
-
-
-/**
  * Metadata
  *
  * @type {Object.<string, Array.<Object>>}
diff --git a/compiler-jx/src/test/resources/royale/projects/package_conflicts_no_conflict_no_window/NoConflictNoWindow_result.js b/compiler-jx/src/test/resources/royale/projects/package_conflicts_no_conflict_no_window/NoConflictNoWindow_result.js
index f037289..c40cde5 100644
--- a/compiler-jx/src/test/resources/royale/projects/package_conflicts_no_conflict_no_window/NoConflictNoWindow_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/package_conflicts_no_conflict_no_window/NoConflictNoWindow_result.js
@@ -34,12 +34,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('NoConflictNoWindow', NoConflictNoWindow);
-
-
-/**
  * @private
  * @type {mypackage.TestClass}
  */
diff --git a/compiler-jx/src/test/resources/royale/projects/package_conflicts_no_conflict_no_window/mypackage/TestClass_result.js b/compiler-jx/src/test/resources/royale/projects/package_conflicts_no_conflict_no_window/mypackage/TestClass_result.js
index e4726df..d864bc8 100644
--- a/compiler-jx/src/test/resources/royale/projects/package_conflicts_no_conflict_no_window/mypackage/TestClass_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/package_conflicts_no_conflict_no_window/mypackage/TestClass_result.js
@@ -34,12 +34,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('mypackage.TestClass', mypackage.TestClass);
-
-
-/**
  * @private
  * @type {Event}
  */
diff --git a/compiler-jx/src/test/resources/royale/projects/package_conflicts_no_conflict_use_window/Event_result.js b/compiler-jx/src/test/resources/royale/projects/package_conflicts_no_conflict_use_window/Event_result.js
index 66a991c..c7afd93 100644
--- a/compiler-jx/src/test/resources/royale/projects/package_conflicts_no_conflict_use_window/Event_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/package_conflicts_no_conflict_use_window/Event_result.js
@@ -32,12 +32,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('Event', Event);
-
-
-/**
  * Metadata
  *
  * @type {Object.<string, Array.<Object>>}
diff --git a/compiler-jx/src/test/resources/royale/projects/package_conflicts_no_conflict_use_window/NoConflictUseWindow_result.js b/compiler-jx/src/test/resources/royale/projects/package_conflicts_no_conflict_use_window/NoConflictUseWindow_result.js
index 65d2724..ea8c44f 100644
--- a/compiler-jx/src/test/resources/royale/projects/package_conflicts_no_conflict_use_window/NoConflictUseWindow_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/package_conflicts_no_conflict_use_window/NoConflictUseWindow_result.js
@@ -34,12 +34,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('NoConflictUseWindow', NoConflictUseWindow);
-
-
-/**
  * @private
  * @type {mypackage.TestClass}
  */
diff --git a/compiler-jx/src/test/resources/royale/projects/package_conflicts_no_conflict_use_window/mypackage/TestClass_result.js b/compiler-jx/src/test/resources/royale/projects/package_conflicts_no_conflict_use_window/mypackage/TestClass_result.js
index e4726df..d864bc8 100644
--- a/compiler-jx/src/test/resources/royale/projects/package_conflicts_no_conflict_use_window/mypackage/TestClass_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/package_conflicts_no_conflict_use_window/mypackage/TestClass_result.js
@@ -34,12 +34,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('mypackage.TestClass', mypackage.TestClass);
-
-
-/**
  * @private
  * @type {Event}
  */
diff --git a/compiler-jx/src/test/resources/royale/projects/package_conflicts_same_package_as_conflict/Event_result.js b/compiler-jx/src/test/resources/royale/projects/package_conflicts_same_package_as_conflict/Event_result.js
index 66a991c..c7afd93 100644
--- a/compiler-jx/src/test/resources/royale/projects/package_conflicts_same_package_as_conflict/Event_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/package_conflicts_same_package_as_conflict/Event_result.js
@@ -32,12 +32,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('Event', Event);
-
-
-/**
  * Metadata
  *
  * @type {Object.<string, Array.<Object>>}
diff --git a/compiler-jx/src/test/resources/royale/projects/package_conflicts_same_package_as_conflict/SamePackageAsConflict_result.js b/compiler-jx/src/test/resources/royale/projects/package_conflicts_same_package_as_conflict/SamePackageAsConflict_result.js
index 07b5ac0..f670ad9 100644
--- a/compiler-jx/src/test/resources/royale/projects/package_conflicts_same_package_as_conflict/SamePackageAsConflict_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/package_conflicts_same_package_as_conflict/SamePackageAsConflict_result.js
@@ -34,12 +34,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('SamePackageAsConflict', SamePackageAsConflict);
-
-
-/**
  * @private
  * @type {mypackage.TestClass}
  */
diff --git a/compiler-jx/src/test/resources/royale/projects/package_conflicts_same_package_as_conflict/mypackage/Event_result.js b/compiler-jx/src/test/resources/royale/projects/package_conflicts_same_package_as_conflict/mypackage/Event_result.js
index b9429ad..18997ac 100644
--- a/compiler-jx/src/test/resources/royale/projects/package_conflicts_same_package_as_conflict/mypackage/Event_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/package_conflicts_same_package_as_conflict/mypackage/Event_result.js
@@ -32,12 +32,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('mypackage.Event', mypackage.Event);
-
-
-/**
  * Metadata
  *
  * @type {Object.<string, Array.<Object>>}
diff --git a/compiler-jx/src/test/resources/royale/projects/package_conflicts_same_package_as_conflict/mypackage/TestClass_result.js b/compiler-jx/src/test/resources/royale/projects/package_conflicts_same_package_as_conflict/mypackage/TestClass_result.js
index 1a9924f..f633ba1 100644
--- a/compiler-jx/src/test/resources/royale/projects/package_conflicts_same_package_as_conflict/mypackage/TestClass_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/package_conflicts_same_package_as_conflict/mypackage/TestClass_result.js
@@ -36,12 +36,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('mypackage.TestClass', mypackage.TestClass);
-
-
-/**
  * @private
  * @type {mypackage.Event}
  */
diff --git a/compiler-jx/src/test/resources/royale/projects/package_conflicts_use_window/Event_result.js b/compiler-jx/src/test/resources/royale/projects/package_conflicts_use_window/Event_result.js
index 66a991c..c7afd93 100644
--- a/compiler-jx/src/test/resources/royale/projects/package_conflicts_use_window/Event_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/package_conflicts_use_window/Event_result.js
@@ -32,12 +32,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('Event', Event);
-
-
-/**
  * Metadata
  *
  * @type {Object.<string, Array.<Object>>}
diff --git a/compiler-jx/src/test/resources/royale/projects/package_conflicts_use_window/UseWindow_result.js b/compiler-jx/src/test/resources/royale/projects/package_conflicts_use_window/UseWindow_result.js
index 81a7d42..e904864 100644
--- a/compiler-jx/src/test/resources/royale/projects/package_conflicts_use_window/UseWindow_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/package_conflicts_use_window/UseWindow_result.js
@@ -34,12 +34,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('UseWindow', UseWindow);
-
-
-/**
  * @private
  * @type {mypackage.TestClass}
  */
diff --git a/compiler-jx/src/test/resources/royale/projects/package_conflicts_use_window/mypackage/TestClass_result.js b/compiler-jx/src/test/resources/royale/projects/package_conflicts_use_window/mypackage/TestClass_result.js
index ee74592..12579aa 100644
--- a/compiler-jx/src/test/resources/royale/projects/package_conflicts_use_window/mypackage/TestClass_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/package_conflicts_use_window/mypackage/TestClass_result.js
@@ -37,12 +37,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('mypackage.TestClass', mypackage.TestClass);
-
-
-/**
  * @private
  * @type {Event}
  */
diff --git a/compiler-jx/src/test/resources/royale/projects/package_conflicts_use_window/otherpackage/Event_result.js b/compiler-jx/src/test/resources/royale/projects/package_conflicts_use_window/otherpackage/Event_result.js
index a9df84a..097c752 100644
--- a/compiler-jx/src/test/resources/royale/projects/package_conflicts_use_window/otherpackage/Event_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/package_conflicts_use_window/otherpackage/Event_result.js
@@ -32,12 +32,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('otherpackage.Event', otherpackage.Event);
-
-
-/**
  * Metadata
  *
  * @type {Object.<string, Array.<Object>>}
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 a9f9f92..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
@@ -35,12 +35,6 @@
 goog.inherits(Base, Super);
 
 
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('Base', Base);
-
-
 Base.prototype.get__text = function() {
   return "A" + Base.superClass_.get__text.apply(this);
 };
@@ -55,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 8116b6f..3f2b7c1 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
@@ -31,18 +31,20 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('Super', Super);
-
-
-/**
  * @private
  * @type {string}
  */
 Super.prototype._text = '';
 
 
+/**
+ * @nocollapse
+ * @export
+ * @type {string}
+ */
+Super.prototype.text;
+
+
 Super.prototype.get__text = function() {
   return this._text;
 };
@@ -57,8 +59,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-jx/src/test/resources/royale/projects/xml_requires/XMLRequire_result.js b/compiler-jx/src/test/resources/royale/projects/xml_requires/XMLRequire_result.js
index 54f1e8b..8928228 100644
--- a/compiler-jx/src/test/resources/royale/projects/xml_requires/XMLRequire_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/xml_requires/XMLRequire_result.js
@@ -34,12 +34,6 @@
 
 
 /**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('XMLRequire', XMLRequire);
-
-
-/**
  * Metadata
  *
  * @type {Object.<string, Array.<Object>>}
diff --git a/compiler-playerglobalc/build.xml b/compiler-playerglobalc/build.xml
new file mode 100644
index 0000000..f7d92e2
--- /dev/null
+++ b/compiler-playerglobalc/build.xml
@@ -0,0 +1,148 @@
+<?xml version="1.0" ?>
+
+<!--
+
+  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.
+
+-->
+
+<project name="compiler-playerglobalc" default="main" basedir=".">
+
+    <!-- 
+
+        PROPERTIES
+
+    -->
+
+    <!-- The 'compiler-playerglobalc' property is the absolute path, with forward slashes, -->
+    <!-- to the 'compiler-playerglobalc' directory that contains this file. -->
+    <!-- All input paths are expressed as absolute paths starting with ${compiler-playerglobalc}. -->
+    <pathconvert property="compiler-playerglobalc" dirsep="/">
+        <path location="${basedir}"/>
+    </pathconvert>
+    
+    <!-- The 'compiler-jx' property is the absolute path, with forward slashes, -->
+    <!-- to the 'compiler-jx' directory that is a sibling of the parent folder of this file. -->
+    <!-- All input paths are expressed as absolute paths starting with ${compiler-jx}. -->
+    <pathconvert property="compiler-jx" dirsep="/">
+        <path location="${basedir}/../compiler-jx"/>
+    </pathconvert>
+
+    <property name="sdk" value="${compiler-jx}/lib"/>
+
+    <!-- Properties can be overridden locally by loading a local.properties file -->
+    <!-- Java 8 users probably need javadoc.params=-Xdoclint:none -->
+    <property file="${compiler-playerglobalc}/local.properties"/>
+    <property file="${basedir}/../env.properties"/>
+    
+    <property name="src.depend" value="true"/>
+
+    <!-- Options for <javac> tasks -->
+    <property name="javac.debug" value="true"/>
+    <property name="javac.deprecation" value="false"/>
+    <property name="javac.src" value="1.6"/>
+
+    <!-- JAR manifest entries -->
+    <property name="manifest.sealed" value="false"/>
+    <property name="manifest.Implementation-Title" value="Apache Royale PlayerGlobal Source Generator"/>
+    <property name="manifest.Implementation-Version" value="${release.version}"/>
+    <property name="manifest.Implementation-Vendor" value="Apache Software Foundation"/>
+    
+    <!-- label is set by CruiseControl script based on P4 label incrementer -->
+    <condition property="build.number" value="${env.BUILD_NUMBER}">
+        <isset property="env.BUILD_NUMBER"/>
+    </condition>
+    
+    <!--
+
+        compiler-playerglobalc
+
+    -->
+
+  <target name="download" description="Downloads third-party JARs">
+      <ant antfile="${compiler-playerglobalc}/src/main/resources/downloads.xml" dir="${compiler-playerglobalc}/src/main/resources" inheritAll="false"/>
+  </target>
+    
+    <target name="compile" depends="download">
+        <mkdir dir="${compiler-playerglobalc}/target/classes"/>
+        <javac debug="${javac.debug}" deprecation="${javac.deprecation}" destdir="${compiler-playerglobalc}/target/classes" includeAntRuntime="true" includes="**/*.java"
+            source="${javac.src}" target="${javac.src}">
+            <compilerarg value="-Xlint:all,-path,-fallthrough"/>
+            <src path="${compiler-playerglobalc}/src/main/java"/>
+            <classpath>
+                <pathelement location="${compiler-playerglobalc}/target/classes"/>
+                <fileset dir="${compiler-playerglobalc}/../compiler-jx/lib" includes="dom4j.jar"/>
+                <fileset dir="${compiler-playerglobalc}/../compiler/lib" includes="compiler-common.jar,external/flex-tool-api.jar"/>
+                <fileset dir="${compiler-playerglobalc}/../compiler/lib/external" includes="commons-io.jar"/>
+            </classpath>
+        </javac>
+    </target>
+    
+    <target name="prebuild">
+        <mkdir dir="${compiler-playerglobalc}/target/classes" />
+        <mkdir dir="${compiler-playerglobalc}/target/classes/META-INF" />
+    </target>
+    
+    <target name="main" depends="prebuild,compile" >
+        <mkdir dir="${sdk}"/>
+        <copy file="${basedir}/../LICENSE.base" tofile="${compiler-playerglobalc}/target/classes/META-INF/LICENSE"/>
+        <copy file="${basedir}/../NOTICE.base" tofile="${compiler-playerglobalc}/target/classes/META-INF/NOTICE"/>
+        <jar file="${sdk}/compiler-playerglobalc.jar" basedir="${compiler-playerglobalc}/target/classes" includes="**/*.properties,org/apache/**/*,com/google/javascript/**/*,META-INF/**/*">
+            <include name="META-INF/LICENSE"/>
+            <include name="META-INF/NOTICE"/>
+            <manifest>
+                <attribute name="Sealed" value="${manifest.sealed}"/>
+                <attribute name="Implementation-Title" value="${manifest.Implementation-Title}"/>
+                <attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}"/>
+                <attribute name="Implementation-Vendor" value="${manifest.Implementation-Vendor}"/>
+                <attribute name="Main-Class" value="org.apache.royale.compiler.clients.PLAYERGLOBALC" />
+                <attribute name="Class-Path" value="../../compiler/lib/external/commons-io.jar ../../lib/external/commons-io.jar ../../compiler-jx/lib/dom4j.jar dom4j.jar ../../compiler/lib/compiler-common.jar ../../lib/compiler-common.jar ../../compiler/lib/external/flex-tool-api.jar ../../lib/external/flex-tool-api.jar"/>
+                <!-- The .. in the line above allows the compiler to load the env.properties file -->
+            </manifest>
+        </jar>
+        <antcall target="test" />
+        <antcall target="jar-test" />
+    </target>
+
+    <target name="test" >
+        <!--<ant dir="src/test" />-->
+    </target>
+    
+    <target name="jar-test" >
+        <!--<echo>using compiler-playerglobalc.jar from ${sdk}</echo>
+        <java jar="${sdk}/compiler-playerglobalc.jar" fork="true"
+            failonerror="true">
+            <arg value="playerglobal/bundles/en_US/docs"/>
+        </java>-->
+    </target>
+    
+    <!--
+
+        CLEANUP
+
+    -->
+
+    <target name="clean" description="clean">
+        <delete dir="${compiler-playerglobalc}/target/classes"/>
+        <delete file="${compiler-playerglobalc}/target/playerglobal.swc"/>
+        <delete file="${compiler-playerglobalc}/target/airglobal.swc"/>
+    </target>
+
+    <target name="wipe" depends="clean" description="Wipes everything that didn't come from Git.">
+        <delete dir="${compiler-playerglobalc}/target"/>
+    </target>
+
+ </project>
diff --git a/compiler-playerglobalc/pom.xml b/compiler-playerglobalc/pom.xml
new file mode 100644
index 0000000..8024794
--- /dev/null
+++ b/compiler-playerglobalc/pom.xml
@@ -0,0 +1,77 @@
+<?xml version="1.0"?>
+<!--
+
+  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.
+
+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.royale.compiler</groupId>
+    <artifactId>royale-compiler-parent</artifactId>
+    <version>0.9.8</version>
+  </parent>
+
+  <artifactId>compiler-playerglobalc</artifactId>
+  <version>0.9.8</version>
+  
+  <build>
+    <plugins>
+        <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-jar-plugin</artifactId>
+            <executions>
+                <execution>
+                    <id>default-jar</id>
+                    <configuration>
+                        <archive>
+                            <manifestEntries>
+                                <!-- These paths are all defined the way the layout will be in the distribution -->
+                                <Class-Path>../../compiler/lib/external/commons-io.jar ../../lib/external/commons-io.jar ../../compiler-jx/lib/dom4j.jar dom4j.jar ../../compiler/lib/compiler-common.jar ../../lib/compiler-common.jar ../../compiler/lib/external/flex-tool-api.jar ../../lib/external/flex-tool-api.jar</Class-Path>
+                            </manifestEntries>
+                        </archive>
+                    </configuration>
+                </execution>
+                <execution>
+                    <id>default-test-jar</id>
+                    <goals>
+                        <goal>test-jar</goal>
+                    </goals>
+                </execution>
+            </executions>
+        </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.royale.compiler</groupId>
+      <artifactId>compiler-common</artifactId>
+      <version>0.9.8</version>
+    </dependency>
+    <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
+      <version>2.4</version>
+    </dependency>
+    <dependency>
+      <groupId>dom4j</groupId>
+      <artifactId>dom4j</artifactId>
+      <version>1.6.1</version>
+    </dependency>
+  </dependencies>
+
+</project>
diff --git a/compiler-playerglobalc/src/main/java/org/apache/royale/compiler/clients/PLAYERGLOBALC.java b/compiler-playerglobalc/src/main/java/org/apache/royale/compiler/clients/PLAYERGLOBALC.java
new file mode 100644
index 0000000..523a4a0
--- /dev/null
+++ b/compiler-playerglobalc/src/main/java/org/apache/royale/compiler/clients/PLAYERGLOBALC.java
@@ -0,0 +1,1487 @@
+/*
+ *
+ *  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.clients;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.StringReader;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.flex.tools.FlexTool;
+import org.apache.royale.compiler.clients.problems.ProblemFormatter;
+import org.apache.royale.compiler.clients.problems.ProblemPrinter;
+import org.apache.royale.compiler.clients.problems.ProblemQuery;
+import org.apache.royale.compiler.config.Configurator;
+import org.apache.royale.compiler.config.PlayerglobalcConfigurator;
+import org.apache.royale.compiler.targets.ITarget.TargetType;
+import org.dom4j.Document;
+import org.dom4j.DocumentHelper;
+import org.dom4j.Element;
+import org.dom4j.io.SAXReader;
+
+/**
+ * Generates .as source files to build playerglobal.swc and airglobal.swc from
+ * the ASDoc DITA XML files.
+ */
+class PLAYERGLOBALC implements FlexTool {
+
+	static enum ExitCode {
+		SUCCESS(0), PRINT_HELP(1), FAILED_WITH_PROBLEMS(2), FAILED_WITH_EXCEPTIONS(3), FAILED_WITH_CONFIG_PROBLEMS(4);
+
+		ExitCode(int code) {
+			this.code = code;
+		}
+
+		final int code;
+	}
+
+	private static final List<String> VECTOR_SUFFIXES = Arrays.asList("$double", "$int", "$uint", "$object");
+	// From the docs: Methods of the Object class are dynamically created on
+	// Object's prototype.
+	private static final List<String> OBJECT_PROTOTYPE_METHODS = Arrays.asList("setPropertyIsEnumerable", "toString",
+			"toLocaleString", "valueOf");
+	private static final List<String> OBJECT_AS3_METHODS = Arrays.asList("hasOwnProperty", "isPrototypeOf",
+			"propertyIsEnumerable");
+	private static final List<String> ANY_CONSTRUCTORS = Arrays.asList("ArgumentError", "Boolean", "Date",
+			"DefinitionError", "Error", "EvalError", "int", "Number", "RangeError", "ReferenceError", "RegExp",
+			"SecurityError", "String", "SyntaxError", "TypeError", "uint", "URIError", "VerifyError", "XML", "XMLList");
+	private static final Map<String, String> GLOBAL_CONSTANTS = new HashMap<String, String>();
+	{
+		GLOBAL_CONSTANTS.put("Infinity", "1 / 0");
+		GLOBAL_CONSTANTS.put("NaN", "0 / 0");
+		GLOBAL_CONSTANTS.put("undefined", "void 0");
+	}
+	private static final Map<String, List<String>> WRITABLE_VARIABLES = new HashMap<String, List<String>>();
+	{
+		WRITABLE_VARIABLES.put("flash.external.ExternalInterface", Arrays.asList("marshallExceptions"));
+	}
+	private static final Map<String, List<String>> REST_METHODS = new HashMap<String, List<String>>();
+	{
+		REST_METHODS.put("Array", Arrays.asList("splice"));
+		REST_METHODS.put("__AS3__.vec.Vector$object", Arrays.asList("sort"));
+		REST_METHODS.put("__AS3__.vec.Vector$double", Arrays.asList("sort"));
+		REST_METHODS.put("__AS3__.vec.Vector$int", Arrays.asList("sort"));
+		REST_METHODS.put("__AS3__.vec.Vector$uint", Arrays.asList("sort"));
+	}
+	private static final Map<String, List<String>> NULL_DEFAULT_METHODS = new HashMap<String, List<String>>();
+	{
+		NULL_DEFAULT_METHODS.put("Date",
+				Arrays.asList("setFullYear", "setMonth", "setDate", "setHours", "setMinutes", "setSeconds",
+						"setMilliseconds", "setUTCFullYear", "setUTCMonth", "setUTCDate", "setUTCHours",
+						"setUTCMinutes", "setUTCSeconds", "setUTCMilliseconds", "setTime"));
+		NULL_DEFAULT_METHODS.put("Number", Arrays.asList("toExponential", "toFixed", "toPrecision"));
+		NULL_DEFAULT_METHODS.put("Object", Arrays.asList("hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable"));
+	}
+	private static final Map<String, List<String>> ANY_METHODS = new HashMap<String, List<String>>();
+	{
+		ANY_METHODS.put("Date",
+				Arrays.asList("setFullYear", "setMonth", "setDate", "setHours", "setMinutes", "setSeconds",
+						"setMilliseconds", "setUTCFullYear", "setUTCMonth", "setUTCDate", "setUTCHours",
+						"setUTCMinutes", "setUTCSeconds", "setUTCMilliseconds", "setTime", "UTC", "parse"));
+		ANY_METHODS.put("Number", Arrays.asList("toExponential", "toFixed", "toPrecision", "toString"));
+		ANY_METHODS.put("Object", Arrays.asList("hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable"));
+		ANY_METHODS.put("XML", Arrays.asList("addNamespace", "appendChild", "attribute", "child", "contains",
+				"descendants", "elements", "insertChildAfter", "insertChildBefore", "namespace", "prependChild",
+				"processingInstructions", "removeNamespace", "replace", "setChildren", "setName", "setNamespace"));
+		ANY_METHODS.put("XMLList", Arrays.asList("addNamespace", "appendChild", "attribute", "child", "contains",
+				"descendants", "elements", "insertChildAfter", "insertChildBefore", "namespace", "prependChild",
+				"processingInstructions", "removeNamespace", "replace", "setChildren", "setName", "setNamespace"));
+	}
+	private static final Map<String, List<String>> ANY_VARIABLES = new HashMap<String, List<String>>();
+	{
+		ANY_VARIABLES.put("Object", Arrays.asList("constructor"));
+	}
+	private static final Map<String, List<String>> EXTRA_MEMBERS = new HashMap<String, List<String>>();
+	{
+		EXTRA_MEMBERS.put("Array", Arrays.asList("AS3 native function insertAt(index:int, element:*):void",
+				"AS3 native function removeAt(index:int):*"));
+		EXTRA_MEMBERS.put("Function", Arrays.asList("public native function get prototype():*",
+				"public native function set prototype(value:*):void", "public native function get length():int;"));
+		EXTRA_MEMBERS.put("String", Arrays.asList("AS3 native function toString():String"));
+		EXTRA_MEMBERS.put("__AS3__.vec.Vector$double",
+				Arrays.asList("AS3 native function insertAt(index:int, element:Number):void",
+						"AS3 native function removeAt(index:int):Number"));
+		EXTRA_MEMBERS.put("__AS3__.vec.Vector$int",
+				Arrays.asList("AS3 native function insertAt(index:int, element:int):void",
+						"AS3 native function removeAt(index:int):int"));
+		EXTRA_MEMBERS.put("__AS3__.vec.Vector$uint",
+				Arrays.asList("AS3 native function insertAt(index:int, element:uint):void",
+						"AS3 native function removeAt(index:int):uint"));
+		EXTRA_MEMBERS.put("__AS3__.vec.Vector$object",
+				Arrays.asList("AS3 native function insertAt(index:int, element:Object):void",
+						"AS3 native function removeAt(index:int):Object"));
+		EXTRA_MEMBERS.put("flash.display.DisplayObjectContainer", Arrays
+				.asList("public native function removeChildren(beginIndex:int = 0, endIndex:int = 0x7fffffff):void"));
+		EXTRA_MEMBERS.put("flash.display.Graphics", Arrays.asList(
+				"public native function cubicCurveTo(controlX1:Number, controlY1:Number, controlX2:Number, controlY2:Number, anchorX:Number, anchorY:Number):void",
+				"public native function drawRoundRectComplex(x:Number, y:Number, width:Number, height:Number, topLeftRadius:Number, topRightRadius:Number, bottomLeftRadius:Number, bottomRightRadius:Number):void"));
+		EXTRA_MEMBERS.put("flash.display.MovieClip",
+				Arrays.asList("public native function addFrameScript(...args):void"));
+		EXTRA_MEMBERS.put("flash.display.Stage",
+				Arrays.asList("public native function get contentsScaleFactor():Number",
+						"public native function get browserZoomFactor():Number"));
+		EXTRA_MEMBERS.put("flash.events.Event",
+				Arrays.asList("public static const BROWSER_ZOOM_CHANGE:String = \"browserZoomChange\""));
+		EXTRA_MEMBERS.put("flash.events.EventDispatcher", Arrays.asList("public native function toString():String"));
+		EXTRA_MEMBERS.put("flash.geom.Matrix", Arrays.asList(
+				"public native function copyFrom(sourceMatrix:flash.geom.Matrix):void",
+				"public native function copyColumnFrom(column:uint, vector3D:flash.geom.Vector3D):void",
+				"public native function copyColumnTo(column:uint, vector3D:flash.geom.Vector3D):void",
+				"public native function copyRowFrom(row:uint, vector3D:flash.geom.Vector3D):void",
+				"public native function copyRowTo(row:uint, vector3D:flash.geom.Vector3D):void",
+				"public native function setTo(a:Number, b:Number, c:Number, d:Number, tx:Number, ty:Number):void"));
+		EXTRA_MEMBERS.put("flash.geom.Matrix3D", Arrays.asList(
+				"public native function copyFrom(sourceMatrix3D:flash.geom.Matrix3D):void",
+				"public native function copyColumnFrom(column:uint, vector3D:flash.geom.Vector3D):void",
+				"public native function copyColumnTo(column:uint, vector3D:flash.geom.Vector3D):void",
+				"public native function copyRowFrom(row:uint, vector3D:flash.geom.Vector3D):void",
+				"public native function copyRowTo(row:uint, vector3D:flash.geom.Vector3D):void",
+				"public native function copyRawDataFrom(vector:Vector.<Number>, index:uint = 0, transpose:Boolean = false):void",
+				"public native function copyRawDataTo(vector:Vector.<Number>, index:uint = 0, transpose:Boolean = false):void"));
+		EXTRA_MEMBERS.put("flash.geom.Point",
+				Arrays.asList("public native function copyFrom(sourcePoint:flash.geom.Point):void",
+						"public native function setTo(x:Number, y:Number):void"));
+		EXTRA_MEMBERS.put("flash.geom.Rectangle",
+				Arrays.asList("public native function copyFrom(sourceRect:flash.geom.Rectangle):void",
+						"public native function setTo(x:Number, y:Number, width:Number, height:Number):void"));
+		EXTRA_MEMBERS.put("flash.geom.Vector3D",
+				Arrays.asList("public native function copyFrom(sourceVector3D:flash.geom.Vector3D):void",
+						"public native function setTo(x:Number, y:Number, z:Number):void"));
+		EXTRA_MEMBERS.put("flash.media.Camera",
+				Arrays.asList("public native function copyToByteArray(rect:Rectangle, destination:ByteArray):void"));
+		EXTRA_MEMBERS.put("flash.text.TextFormatAlign", Arrays.asList("public static const START:String = \"start\"",
+				"public static const END:String = \"end\""));
+	}
+
+	protected ProblemQuery problems;
+	protected Configurator projectConfigurator;
+	protected PlayerglobalcConfiguration configuration;
+	private File sourceFolder;
+	private File targetFolder;
+	private File currentFile;
+
+	/**
+	 * Java program entry point.
+	 * 
+	 * @param args command line arguments
+	 */
+	public static void main(final String[] args) {
+		PLAYERGLOBALC compiler = new PLAYERGLOBALC();
+		int exitCode = compiler.execute(args);
+		System.exit(exitCode);
+	}
+
+	public PLAYERGLOBALC() {
+
+	}
+
+	@Override
+	public String getName() {
+		// TODO: Change this to a flex-tool-api constant ...
+		return "PLAYERGLOBALC";
+	}
+
+	/**
+	 * Create a new Configurator. This method may be overridden to allow
+	 * Configurator subclasses to be created that have custom configurations.
+	 * 
+	 * @return a new instance or subclass of {@link Configurator}.
+	 */
+	protected Configurator createConfigurator() {
+		return new PlayerglobalcConfigurator(PlayerglobalcConfiguration.class);
+	}
+
+	protected boolean configure(String[] args) {
+		projectConfigurator = createConfigurator();
+		projectConfigurator.setConfiguration(args, "asdoc-root", false);
+		projectConfigurator.getTargetSettings(TargetType.SWC);
+		configuration = ((PlayerglobalcConfiguration) projectConfigurator.getConfiguration());
+		problems = new ProblemQuery(projectConfigurator.getCompilerProblemSettings());
+		problems.addAll(projectConfigurator.getConfigurationProblems());
+		if (problems.hasErrors() || configuration == null) {
+			return false;
+		}
+		return true;
+	}
+
+	@Override
+	public int execute(String[] args) {
+		ExitCode exitCode = ExitCode.SUCCESS;
+		try {
+			boolean continueGeneration = configure(args);
+			if (continueGeneration) {
+				sourceFolder = configuration.getASDocRoot();
+				targetFolder = configuration.getAsRoot();
+				generateSources();
+			} else if (problems.hasFilteredProblems()) {
+				exitCode = ExitCode.FAILED_WITH_CONFIG_PROBLEMS;
+			} else {
+				exitCode = ExitCode.PRINT_HELP;
+			}
+		} catch (Exception e) {
+			System.err.println(e.getMessage());
+			exitCode = ExitCode.FAILED_WITH_EXCEPTIONS;
+		} finally {
+			final ProblemFormatter formatter = new ProblemFormatter();
+			final ProblemPrinter printer = new ProblemPrinter(formatter, System.err);
+			printer.printProblems(problems.getFilteredProblems());
+		}
+
+		return exitCode.code;
+	}
+
+	public void generateSources() throws Exception {
+		preclean();
+
+		for (File sourceFile : sourceFolder.listFiles()) {
+			if (sourceFile.isDirectory()) {
+				continue;
+			}
+			String sourceFileName = sourceFile.getName();
+			if (!sourceFileName.endsWith(".xml")) {
+				continue;
+			}
+			if (sourceFileName.endsWith(".dita.xml")) {
+				continue;
+			}
+			parseFile(sourceFile);
+		}
+	}
+
+	private void preclean() throws Exception {
+		FileUtils.deleteDirectory(targetFolder);
+	}
+
+	private void writeFileForDefinition(String fullyQualifiedName, boolean airOnly, String contents)
+			throws IOException {
+		StringBuilder fileNameBuilder = new StringBuilder();
+		String[] parts = fullyQualifiedName.split("\\.");
+		for (String part : parts) {
+			fileNameBuilder.append("/");
+			fileNameBuilder.append(part);
+		}
+		fileNameBuilder.append(".as");
+		File targetFile = new File(this.targetFolder, fileNameBuilder.toString());
+		FileUtils.writeStringToFile(targetFile, contents);
+	}
+
+	private boolean isAIROnly(Element prologElement) {
+		if (prologElement == null) {
+			return false;
+		}
+		Element asMetadataElement = prologElement.element("asMetadata");
+		if (asMetadataElement == null) {
+			return false;
+		}
+		Element apiVersionElement = asMetadataElement.element("apiVersion");
+		if (apiVersionElement == null) {
+			return false;
+		}
+		List<Element> apiPlatformElements = apiVersionElement.elements("apiPlatform");
+		if (apiPlatformElements == null || apiPlatformElements.size() == 0) {
+			return false;
+		}
+		for (Element apiPlatformElement : apiPlatformElements) {
+			if (!"AIR".equals(apiPlatformElement.attributeValue("name"))) {
+				return false;
+			}
+		}
+		return true;
+	}
+
+	private void parseFile(File ditaFile) throws Exception {
+		currentFile = ditaFile;
+		String contents = null;
+		try {
+			contents = FileUtils.readFileToString(ditaFile, Charset.forName("utf8"));
+		} catch (Exception e) {
+			System.err.println("Failed to read XML file: " + ditaFile.getAbsolutePath());
+			return;
+		}
+
+		SAXReader xmlReader = new SAXReader();
+		Document xmlDoc = xmlReader.read(new StringReader(contents));
+
+		Element apiPackageElement = xmlDoc.getRootElement();
+		if (!"apiPackage".equals(apiPackageElement.getName())) {
+			throw new Exception("No apiPackage root element: " + ditaFile.getAbsolutePath());
+		}
+
+		parsePackage(apiPackageElement);
+		currentFile = null;
+	}
+
+	private void parsePackage(Element apiPackageElement) throws Exception {
+		List<Element> apiOperationElements = apiPackageElement.elements("apiOperation");
+		for (Element apiOperationElement : apiOperationElements) {
+			parsePackageFunction(apiOperationElement);
+		}
+		List<Element> apiValueElements = apiPackageElement.elements("apiValue");
+		for (Element apiValueElement : apiValueElements) {
+			parsePackageVariable(apiValueElement);
+		}
+		List<Element> apiClassifierElements = apiPackageElement.elements("apiClassifier");
+		for (Element apiClassifierElement : apiClassifierElements) {
+			Element apiClassifierDetailElement = apiClassifierElement.element("apiClassifierDetail");
+			if (apiClassifierDetailElement == null) {
+				String fullyQualifiedName = apiClassifierElement.attributeValue("id");
+				throw new Exception("Not found: " + fullyQualifiedName);
+			}
+			Element apiClassifierDefElement = apiClassifierDetailElement.element("apiClassifierDef");
+			if (apiClassifierDefElement == null) {
+				String fullyQualifiedName = apiClassifierElement.attributeValue("id");
+				throw new Exception("Not found: " + fullyQualifiedName);
+			}
+			Element apiInterfaceElement = apiClassifierDefElement.element("apiInterface");
+			if (apiInterfaceElement != null) {
+				parseInterface(apiClassifierElement);
+				continue;
+			}
+			parseClass(apiClassifierElement);
+		}
+	}
+
+	private void parseClass(Element apiClassifierElement) throws Exception {
+		String fullyQualifiedName = apiClassifierElement.attributeValue("id");
+		if (fullyQualifiedName.startsWith("globalClassifier:")) {
+			fullyQualifiedName = fullyQualifiedName.substring(17);
+		}
+		if (fullyQualifiedName.equals("Vector")) {
+			// special case in the compiler that doesn't get exposed in docs
+			fullyQualifiedName = "__AS3__.vec:Vector";
+			StringBuilder vectorBuilder = new StringBuilder();
+			vectorBuilder.append("// generated from: ");
+			vectorBuilder.append(currentFile.getName());
+			vectorBuilder.append("\n");
+			vectorBuilder.append("package __AS3__.vec {\n");
+			vectorBuilder.append("\tpublic final dynamic class Vector {\n");
+			vectorBuilder.append("\tpublic native function Vector();\n");
+			vectorBuilder.append("\t}\n");
+			vectorBuilder.append("}\n");
+			writeFileForDefinition("__AS3__.vec.Vector", false, vectorBuilder.toString());
+			for (String suffix : VECTOR_SUFFIXES) {
+				parseClassWithFullyQualifiedName(apiClassifierElement, fullyQualifiedName + suffix);
+			}
+			return;
+		}
+		parseClassWithFullyQualifiedName(apiClassifierElement, fullyQualifiedName);
+	}
+
+	private void parseClassWithFullyQualifiedName(Element apiClassifierElement, String fullyQualifiedName)
+			throws Exception {
+
+		String[] parts = fullyQualifiedName.split(":");
+		String packageName = "";
+		String className = fullyQualifiedName;
+		if (parts.length > 1) {
+			packageName = parts[0];
+			className = parts[1];
+			fullyQualifiedName = packageName + "." + className;
+		}
+
+		boolean isAIROnly = isAIROnly(apiClassifierElement.element("prolog"));
+		if (isAIROnly && !configuration.getAir() && !fullyQualifiedName.equals("flash.display.NativeMenu")
+				&& !fullyQualifiedName.equals("flash.display.NativeMenuItem")) {
+			return;
+		}
+
+		boolean isVector = fullyQualifiedName.startsWith("__AS3__.vec.Vector$");
+
+		Set<String> importFullyQualifiedNames = new HashSet<String>();
+		collectImports(apiClassifierElement, packageName, importFullyQualifiedNames);
+
+		String baseClassFullyQualifiedName = "";
+		List<String> interfaceFullyQualifiedNames = new ArrayList<String>();
+		String access = null;
+		boolean isFinal = false;
+		boolean isDynamic = false;
+
+		Element apiClassifierDetailElement = apiClassifierElement.element("apiClassifierDetail");
+		if (apiClassifierDetailElement == null) {
+			throw new Exception("apiClassifierDetail not found for: " + className);
+		}
+		Element apiClassifierDefElement = apiClassifierDetailElement.element("apiClassifierDef");
+		if (apiClassifierDefElement == null) {
+			throw new Exception("apiClassifierDef not found for: " + className);
+		}
+
+		Element apiBaseClassifierElement = apiClassifierDefElement.element("apiBaseClassifier");
+		if (apiBaseClassifierElement != null) {
+			baseClassFullyQualifiedName = apiBaseClassifierElement.getTextTrim();
+			baseClassFullyQualifiedName = baseClassFullyQualifiedName.replace(":", ".");
+		}
+
+		List<Element> apiBaseInterfaceElements = apiClassifierDefElement.elements("apiBaseInterface");
+		for (Element apiBaseInterfaceElement : apiBaseInterfaceElements) {
+			String interfaceFullyQualifiedName = apiBaseInterfaceElement.getTextTrim();
+			interfaceFullyQualifiedName = interfaceFullyQualifiedName.replace(":", ".");
+			interfaceFullyQualifiedNames.add(interfaceFullyQualifiedName);
+		}
+
+		Element apiAccessElement = apiClassifierDefElement.element("apiAccess");
+		if (apiAccessElement != null) {
+			access = apiAccessElement.attributeValue("value");
+		}
+		if (isVector) {
+			access = "internal";
+		}
+
+		Element apiFinalElement = apiClassifierDefElement.element("apiFinal");
+		if (apiFinalElement != null) {
+			isFinal = true;
+		}
+
+		Element apiDynamicElement = apiClassifierDefElement.element("apiDynamic");
+		if (apiDynamicElement != null) {
+			isDynamic = true;
+		}
+
+		List<Element> apiConstructorElements = apiClassifierElement.elements("apiConstructor");
+		List<Element> apiOperationElements = apiClassifierElement.elements("apiOperation");
+		List<Element> apiValueElements = apiClassifierElement.elements("apiValue");
+
+		StringBuilder classBuilder = new StringBuilder();
+		classBuilder.append("// generated from: ");
+		classBuilder.append(currentFile.getName());
+		classBuilder.append("\n");
+		classBuilder.append("package");
+		if (packageName.length() > 0) {
+			classBuilder.append(" ");
+			classBuilder.append(packageName);
+		}
+		classBuilder.append(" ");
+		classBuilder.append("{");
+		classBuilder.append("\n");
+		writeImports(importFullyQualifiedNames, classBuilder);
+		classBuilder.append("\t");
+		if (access != null && access.length() > 0) {
+			classBuilder.append(access);
+			classBuilder.append(" ");
+		}
+		if (isFinal) {
+			classBuilder.append("final ");
+		}
+		if (isDynamic) {
+			classBuilder.append("dynamic ");
+		}
+		classBuilder.append("class ");
+		classBuilder.append(className);
+		if (baseClassFullyQualifiedName != null && baseClassFullyQualifiedName.length() > 0
+				&& !"Object".equals(baseClassFullyQualifiedName)) {
+			classBuilder.append(" extends ");
+			classBuilder.append(baseClassFullyQualifiedName);
+		}
+		for (int i = 0; i < interfaceFullyQualifiedNames.size(); i++) {
+			String interfaceFullyQualifiedName = interfaceFullyQualifiedNames.get(i);
+			if (i == 0) {
+				classBuilder.append(" implements ");
+			} else {
+				classBuilder.append(", ");
+			}
+			classBuilder.append(interfaceFullyQualifiedName);
+		}
+		classBuilder.append(" ");
+		classBuilder.append("{");
+		classBuilder.append("\n");
+		if (apiConstructorElements.size() > 0) {
+			parseConstructor(apiConstructorElements, fullyQualifiedName, classBuilder);
+		}
+		for (Element apiOperationElement : apiOperationElements) {
+			parseFunction(apiOperationElement, fullyQualifiedName, false, classBuilder);
+		}
+		for (Element apiValueElement : apiValueElements) {
+			parseVariable(apiValueElement, fullyQualifiedName, false, classBuilder);
+		}
+		if (EXTRA_MEMBERS.containsKey(fullyQualifiedName)) {
+			for (String member : EXTRA_MEMBERS.get(fullyQualifiedName)) {
+				classBuilder.append("\t");
+				classBuilder.append(member);
+				classBuilder.append(";");
+				classBuilder.append("\n");
+			}
+		}
+		classBuilder.append("\t");
+		classBuilder.append("}");
+		classBuilder.append("\n");
+		classBuilder.append("}");
+		classBuilder.append("\n");
+
+		writeFileForDefinition(fullyQualifiedName, isAIROnly, classBuilder.toString());
+	}
+
+	private void parseInterface(Element apiClassifierElement) throws Exception {
+		String fullyQualifiedName = apiClassifierElement.attributeValue("id");
+		if (fullyQualifiedName.startsWith("globalClassifier:")) {
+			fullyQualifiedName = fullyQualifiedName.substring(17);
+		}
+
+		String[] parts = fullyQualifiedName.split(":");
+		String packageName = "";
+		String interfaceName = fullyQualifiedName;
+		if (parts.length > 1) {
+			packageName = parts[0];
+			interfaceName = parts[1];
+			fullyQualifiedName = packageName + "." + interfaceName;
+		}
+
+		boolean isAIROnly = isAIROnly(apiClassifierElement.element("prolog"));
+		if (isAIROnly && !configuration.getAir()) {
+			return;
+		}
+
+		Set<String> importFullyQualifiedNames = new HashSet<String>();
+		collectImports(apiClassifierElement, packageName, importFullyQualifiedNames);
+
+		List<String> interfaceFullyQualifiedNames = new ArrayList<String>();
+		String access = null;
+
+		Element apiClassifierDetailElement = apiClassifierElement.element("apiClassifierDetail");
+		if (apiClassifierDetailElement == null) {
+			throw new Exception("apiClassifierDetail not found for: " + interfaceName);
+		}
+		Element apiClassifierDefElement = apiClassifierDetailElement.element("apiClassifierDef");
+		if (apiClassifierDefElement == null) {
+			throw new Exception("apiClassifierDef not found for: " + interfaceName);
+		}
+
+		List<Element> apiBaseInterfaceElements = apiClassifierDefElement.elements("apiBaseInterface");
+		for (Element apiBaseInterfaceElement : apiBaseInterfaceElements) {
+			String baseInterfaceFullyQualifiedName = apiBaseInterfaceElement.getTextTrim();
+			baseInterfaceFullyQualifiedName = baseInterfaceFullyQualifiedName.replace(":", ".");
+			interfaceFullyQualifiedNames.add(baseInterfaceFullyQualifiedName);
+		}
+
+		Element apiAccessElement = apiClassifierDefElement.element("apiAccess");
+		if (apiAccessElement != null) {
+			access = apiAccessElement.attributeValue("value");
+		}
+
+		List<Element> apiOperationElements = apiClassifierElement.elements("apiOperation");
+		List<Element> apiValueElements = apiClassifierElement.elements("apiValue");
+
+		StringBuilder interfaceBuilder = new StringBuilder();
+		interfaceBuilder.append("// generated from: ");
+		interfaceBuilder.append(currentFile.getName());
+		interfaceBuilder.append("\n");
+		interfaceBuilder.append("package");
+		if (packageName.length() > 0) {
+			interfaceBuilder.append(" ");
+			interfaceBuilder.append(packageName);
+		}
+		interfaceBuilder.append(" ");
+		interfaceBuilder.append("{");
+		interfaceBuilder.append("\n");
+		writeImports(importFullyQualifiedNames, interfaceBuilder);
+		interfaceBuilder.append("\t");
+		if (access != null && access.length() > 0) {
+			interfaceBuilder.append(access);
+			interfaceBuilder.append(" ");
+		}
+		interfaceBuilder.append("interface ");
+		interfaceBuilder.append(interfaceName);
+		for (int i = 0; i < interfaceFullyQualifiedNames.size(); i++) {
+			String interfaceFullyQualifiedName = interfaceFullyQualifiedNames.get(i);
+			if (i == 0) {
+				interfaceBuilder.append(" extends ");
+			} else {
+				interfaceBuilder.append(", ");
+			}
+			interfaceBuilder.append(interfaceFullyQualifiedName);
+		}
+		interfaceBuilder.append(" ");
+		interfaceBuilder.append("{");
+		interfaceBuilder.append("\n");
+		for (Element apiOperationElement : apiOperationElements) {
+			parseFunction(apiOperationElement, null, true, interfaceBuilder);
+		}
+		for (Element apiValueElement : apiValueElements) {
+			parseVariable(apiValueElement, fullyQualifiedName, true, interfaceBuilder);
+		}
+		interfaceBuilder.append("\t");
+		interfaceBuilder.append("}");
+		interfaceBuilder.append("\n");
+		interfaceBuilder.append("}");
+		interfaceBuilder.append("\n");
+
+		writeFileForDefinition(fullyQualifiedName, isAIROnly, interfaceBuilder.toString());
+	}
+
+	private void parsePackageFunction(Element apiOperationElement) throws Exception {
+		String fullyQualifiedName = apiOperationElement.attributeValue("id");
+		if (fullyQualifiedName.startsWith("globalOperation:")) {
+			fullyQualifiedName = fullyQualifiedName.substring(16);
+		}
+		if (fullyQualifiedName.equals("Vector")) {
+			// special case in the compiler that doesn't get exposed in docs
+			return;
+		}
+
+		String[] parts = fullyQualifiedName.split(":");
+		String packageName = "";
+		if (parts.length > 1) {
+			packageName = parts[0];
+			fullyQualifiedName = packageName + "." + parts[1];
+		}
+
+		boolean isAIROnly = isAIROnly(apiOperationElement.element("prolog"));
+		if (isAIROnly && !configuration.getAir()) {
+			return;
+		}
+
+		Set<String> importFullyQualifiedNames = new HashSet<String>();
+		collectImports(apiOperationElement, packageName, importFullyQualifiedNames);
+
+		StringBuilder functionBuilder = new StringBuilder();
+		functionBuilder.append("// generated from: ");
+		functionBuilder.append(currentFile.getName());
+		functionBuilder.append("\n");
+		functionBuilder.append("package");
+		if (packageName != null && packageName.length() > 0) {
+			functionBuilder.append(" ");
+			functionBuilder.append(packageName);
+		}
+		functionBuilder.append(" ");
+		functionBuilder.append("{");
+		functionBuilder.append("\n");
+		writeImports(importFullyQualifiedNames, functionBuilder);
+		parseFunction(apiOperationElement, null, false, functionBuilder);
+		functionBuilder.append("}");
+		functionBuilder.append("\n");
+
+		writeFileForDefinition(fullyQualifiedName, isAIROnly, functionBuilder.toString());
+	}
+
+	private void parsePackageVariable(Element apiValueElement) throws Exception {
+		String fullyQualifiedName = apiValueElement.attributeValue("id");
+		if (fullyQualifiedName.startsWith("globalValue:")) {
+			fullyQualifiedName = fullyQualifiedName.substring(12);
+		}
+
+		String[] parts = fullyQualifiedName.split(":");
+		String packageName = "";
+		String variableName = fullyQualifiedName;
+		if (parts.length > 1) {
+			packageName = parts[0];
+			variableName = parts[1];
+			fullyQualifiedName = packageName + "." + variableName;
+		}
+
+		if (variableName.startsWith("-")) {
+			// nothing to do here
+			// it's just a negative value getting documented (like -Infinity)
+			return;
+		}
+
+		boolean isAIROnly = isAIROnly(apiValueElement.element("prolog"));
+		if (isAIROnly && !configuration.getAir()) {
+			return;
+		}
+
+		Set<String> importFullyQualifiedNames = new HashSet<String>();
+		collectImports(apiValueElement, packageName, importFullyQualifiedNames);
+
+		StringBuilder variableBuilder = new StringBuilder();
+		variableBuilder.append("// generated from: ");
+		variableBuilder.append(currentFile.getName());
+		variableBuilder.append("\n");
+		variableBuilder.append("package");
+		if (packageName != null && packageName.length() > 0) {
+			variableBuilder.append(" ");
+			variableBuilder.append(packageName);
+		}
+		variableBuilder.append(" ");
+		variableBuilder.append("{");
+		variableBuilder.append("\n");
+		writeImports(importFullyQualifiedNames, variableBuilder);
+		parseVariable(apiValueElement, null, false, variableBuilder);
+		variableBuilder.append("}");
+		variableBuilder.append("\n");
+
+		writeFileForDefinition(fullyQualifiedName, isAIROnly, variableBuilder.toString());
+	}
+
+	private void parseVariable(Element apiValueElement, String contextClassName, boolean forInterface,
+			StringBuilder variableBuilder) throws Exception {
+		boolean isAIROnly = isAIROnly(apiValueElement.element("prolog"));
+		if (isAIROnly && !configuration.getAir()) {
+			return;
+		}
+
+		String variableName = apiValueElement.element("apiName").getTextTrim();
+
+		boolean isGetter = false;
+		boolean isSetter = false;
+		boolean isConst = !isVariableThatShouldBeWritable(contextClassName, variableName);
+		boolean isStatic = false;
+		boolean isOverride = false;
+		String variableType = "*";
+		boolean forceAnyType = isVariableTypedAsAny(contextClassName, variableName);
+		String access = null;
+
+		Element apiValueDetailElement = apiValueElement.element("apiValueDetail");
+		if (apiValueDetailElement == null) {
+			throw new Exception("apiValueDetail not found for: " + variableName);
+		}
+		Element apiValueDefElement = apiValueDetailElement.element("apiValueDef");
+		if (apiValueDefElement == null) {
+			throw new Exception("apiValueDef not found for: " + variableName);
+		}
+
+		Element apiValueClassifierElement = apiValueDefElement.element("apiValueClassifier");
+		if (apiValueClassifierElement != null) {
+			variableType = apiValueClassifierElement.getTextTrim();
+			variableType = variableType.replace(":", ".");
+		}
+
+		Element apiAccessElement = apiValueDefElement.element("apiAccess");
+		if (!forInterface && apiAccessElement != null) {
+			access = apiAccessElement.attributeValue("value");
+		}
+
+		Element apiStaticElement = apiValueDefElement.element("apiStatic");
+		if (!forInterface && apiStaticElement != null) {
+			isStatic = true;
+		}
+
+		Element apiDynamicElement = apiValueDefElement.element("apiDynamic");
+		if (apiDynamicElement != null) {
+			isConst = false;
+		}
+
+		Element apiValueAccessElement = apiValueDefElement.element("apiValueAccess");
+		if (apiValueAccessElement != null) {
+			String readwrite = apiValueAccessElement.attributeValue("value");
+			isGetter = "readwrite".equals(readwrite) || "read".equals(readwrite);
+			isSetter = "readwrite".equals(readwrite) || "write".equals(readwrite);
+		}
+
+		Element apiIsOverrideElement = apiValueDefElement.element("apiIsOverride");
+		if (apiIsOverrideElement != null) {
+			isOverride = true;
+		}
+
+		if (!forInterface && isGetter && isSetter && !isOverride
+				&& apiValueElement.attributeValue("id").endsWith(":set")) {
+			// skip the getter because it is already defined on the base class
+			// example: flash.text.engine.TextElement.text
+			isGetter = false;
+		}
+
+		Element apiDataElement = apiValueDefElement.element("apiData");
+
+		if (isGetter) {
+			variableBuilder.append("\t");
+			if (access != null && access.length() > 0) {
+				variableBuilder.append(access);
+				variableBuilder.append(" ");
+			}
+			if (isStatic) {
+				variableBuilder.append("static ");
+			}
+			if (!forInterface) {
+				variableBuilder.append("native ");
+			}
+			if (isOverride) {
+				variableBuilder.append("override ");
+			}
+			variableBuilder.append("function ");
+			variableBuilder.append("get ");
+			variableBuilder.append(variableName);
+			variableBuilder.append("(");
+			variableBuilder.append(")");
+			variableBuilder.append(":");
+			if (forceAnyType) {
+				variableBuilder.append("*");
+			} else {
+				variableBuilder.append(variableType);
+			}
+			variableBuilder.append(";");
+			variableBuilder.append("\n");
+		}
+
+		if (isSetter) {
+			variableBuilder.append("\t");
+			if (access != null && access.length() > 0) {
+				variableBuilder.append(access);
+				variableBuilder.append(" ");
+			}
+			if (isStatic) {
+				variableBuilder.append("static ");
+			}
+			if (!forInterface) {
+				variableBuilder.append("native ");
+			}
+			if (isOverride) {
+				variableBuilder.append("override ");
+			}
+			variableBuilder.append("function ");
+			variableBuilder.append("set ");
+			variableBuilder.append(variableName);
+			variableBuilder.append("(");
+			variableBuilder.append("value");
+			variableBuilder.append(":");
+			if (forceAnyType) {
+				variableBuilder.append("*");
+			} else {
+				variableBuilder.append(variableType);
+			}
+			variableBuilder.append(")");
+			variableBuilder.append(":");
+			variableBuilder.append("void");
+			variableBuilder.append(";");
+			variableBuilder.append("\n");
+		}
+
+		if (!isGetter && !isSetter) {
+			variableBuilder.append("\t");
+			if (access != null && access.length() > 0) {
+				variableBuilder.append(access);
+				variableBuilder.append(" ");
+			}
+			if (isStatic) {
+				variableBuilder.append("static ");
+			}
+			if (isConst || (contextClassName == null && GLOBAL_CONSTANTS.containsKey(variableName))) {
+				variableBuilder.append("const ");
+			} else {
+				variableBuilder.append("var ");
+			}
+			variableBuilder.append(variableName);
+			variableBuilder.append(":");
+			if (forceAnyType) {
+				variableBuilder.append("*");
+			} else {
+				variableBuilder.append(variableType);
+			}
+			if (contextClassName == null && GLOBAL_CONSTANTS.containsKey(variableName)) {
+				variableBuilder.append(" = ");
+				variableBuilder.append(GLOBAL_CONSTANTS.get(variableName));
+			} else if (apiDataElement != null) {
+				writeVariableOrParameterValue(apiDataElement, variableType, variableBuilder);
+			}
+			variableBuilder.append(";");
+			variableBuilder.append("\n");
+		}
+	}
+
+	private void parseFunction(Element apiOperationElement, String contextClassName, boolean forInterface,
+			StringBuilder functionBuilder) throws Exception {
+		boolean isAIROnly = isAIROnly(apiOperationElement.element("prolog"));
+		if (isAIROnly && !configuration.getAir()) {
+			return;
+		}
+
+		String functionName = apiOperationElement.element("apiName").getTextTrim();
+
+		boolean isStatic = false;
+		boolean isOverride = false;
+		String returnType = "*";
+		String access = null;
+
+		Element apiOperationDetailElement = apiOperationElement.element("apiOperationDetail");
+		if (apiOperationDetailElement == null) {
+			throw new Exception("apiOperationDetail not found for: " + functionName);
+		}
+		Element apiOperationDefElement = apiOperationDetailElement.element("apiOperationDef");
+		if (apiOperationDefElement == null) {
+			throw new Exception("apiOperationDef not found for: " + functionName);
+		}
+
+		Element apiIsOverrideElement = apiOperationDefElement.element("apiIsOverride");
+		if (apiIsOverrideElement != null) {
+			isOverride = true;
+			if (!configuration.getAir() && "clone".equals(functionName)
+					&& "flash.ui.ContextMenuItem".equals(contextClassName)) {
+				isOverride = false;
+			}
+		}
+
+		Element apiReturnElement = apiOperationDefElement.element("apiReturn");
+		if (apiReturnElement != null) {
+			Element apiTypeElement = apiReturnElement.element("apiType");
+			if (apiTypeElement != null) {
+				returnType = parseReturnOrParamType(apiTypeElement, contextClassName);
+			}
+			Element apiOperationClassifierElement = apiReturnElement.element("apiOperationClassifier");
+			if (apiOperationClassifierElement != null) {
+				returnType = apiOperationClassifierElement.getTextTrim();
+				returnType = returnType.replace(":", ".");
+			}
+		}
+
+		Element apiAccessElement = apiOperationDefElement.element("apiAccess");
+		if (!forInterface && apiAccessElement != null) {
+			access = apiAccessElement.attributeValue("value");
+		}
+
+		Element apiStaticElement = apiOperationDefElement.element("apiStatic");
+		if (!forInterface && apiStaticElement != null) {
+			isStatic = true;
+		}
+
+		List<Element> apiParamElements = apiOperationDefElement.elements("apiParam");
+
+		if (OBJECT_AS3_METHODS.contains(functionName)) {
+			if ("Object".equals(contextClassName)) {
+				access = "AS3";
+			} else {
+				return;
+			}
+		}
+		if ("Object".equals(contextClassName) && OBJECT_PROTOTYPE_METHODS.contains(functionName)) {
+			return;
+		}
+		if ("toString".equals(functionName) && isOverride) {
+			return;
+		}
+
+		functionBuilder.append("\t");
+		if (access != null && access.length() > 0) {
+			functionBuilder.append(access);
+			functionBuilder.append(" ");
+		}
+		if (isStatic) {
+			functionBuilder.append("static ");
+		}
+		if (!forInterface) {
+			functionBuilder.append("native ");
+		}
+		if (isOverride) {
+			functionBuilder.append("override ");
+		}
+		functionBuilder.append("function ");
+		functionBuilder.append(functionName);
+		functionBuilder.append("(");
+		parseParameters(apiParamElements, contextClassName, functionName, functionBuilder);
+		functionBuilder.append(")");
+		functionBuilder.append(":");
+		functionBuilder.append(returnType);
+		functionBuilder.append(";");
+		functionBuilder.append("\n");
+	}
+
+	private void parseConstructor(List<Element> apiConstructorElements, String contextClassName,
+			StringBuilder functionBuilder) throws Exception {
+		String constructorName = null;
+		String access = null;
+		List<Element> apiParamElements = null;
+
+		for (Element apiConstructorElement : apiConstructorElements) {
+			if (constructorName == null) {
+				constructorName = apiConstructorElement.element("apiName").getTextTrim();
+			}
+
+			Element apiConstructorDetailElement = apiConstructorElement.element("apiConstructorDetail");
+			if (apiConstructorDetailElement == null) {
+				throw new Exception("apiConstructorDetail not found for: " + constructorName);
+			}
+			Element apiConstructorDefElement = apiConstructorDetailElement.element("apiConstructorDef");
+			if (apiConstructorDefElement == null) {
+				throw new Exception("apiConstructorDef not found for: " + constructorName);
+			}
+
+			Element apiAccessElement = apiConstructorDefElement.element("apiAccess");
+			if (apiAccessElement != null) {
+				access = apiAccessElement.attributeValue("value");
+			}
+
+			List<Element> newApiParamElements = apiConstructorDefElement.elements("apiParam");
+			apiParamElements = mergeParameters(apiParamElements, newApiParamElements);
+		}
+
+		functionBuilder.append("\t");
+		if (access != null && access.length() > 0) {
+			functionBuilder.append(access);
+			functionBuilder.append(" ");
+		}
+		functionBuilder.append("native ");
+		functionBuilder.append("function ");
+		functionBuilder.append(constructorName);
+		functionBuilder.append("(");
+		parseParameters(apiParamElements, contextClassName, constructorName, functionBuilder);
+		functionBuilder.append(")");
+		functionBuilder.append(";");
+		functionBuilder.append("\n");
+	}
+
+	private List<Element> mergeParameters(List<Element> apiParamElements1, List<Element> apiParamElements2)
+			throws Exception {
+		if (apiParamElements1 == null) {
+			return apiParamElements2;
+		}
+		if (apiParamElements2 == null) {
+			return apiParamElements1;
+		}
+		ArrayList<Element> result = new ArrayList<Element>();
+		for (int i = 0, count = Math.max(apiParamElements1.size(), apiParamElements2.size()); i < count; i++) {
+			Element apiParamElement1 = (apiParamElements1.size() > i) ? apiParamElements1.get(i) : null;
+			Element apiParamElement2 = (apiParamElements2.size() > i) ? apiParamElements2.get(i) : null;
+			if (apiParamElement1 == null) {
+				Element apiDataElement2 = apiParamElement2.element("apiData");
+				if (apiDataElement2 == null) {
+					apiDataElement2 = DocumentHelper.createElement("apiData");
+					apiDataElement2.setText("null");
+					apiParamElement2.add(apiDataElement2);
+				}
+				boolean isRest = false;
+				Element apiTypeElement2 = apiParamElement2.element("apiType");
+				if (apiTypeElement2 != null) {
+					String apiTypeValue2 = apiTypeElement2.attributeValue("value");
+					if ("restParam".equals(apiTypeValue2)) {
+						isRest = true;
+					}
+					apiParamElement2.remove(apiTypeElement2);
+				}
+				apiTypeElement2 = DocumentHelper.createElement("apiType");
+				if (isRest) {
+					apiTypeElement2.addAttribute("value", "restParam");
+				} else {
+					apiTypeElement2.addAttribute("value", "any");
+				}
+				apiParamElement2.add(apiTypeElement2);
+				Element apiOperationClassifierElement2 = apiParamElement2.element("apiOperationClassifier");
+				if (apiOperationClassifierElement2 != null) {
+					apiParamElement2.remove(apiOperationClassifierElement2);
+				}
+				result.add(apiParamElement2);
+				if (isRest) {
+					// nothing after rest
+					break;
+				}
+				continue;
+			}
+			if (apiParamElement2 == null) {
+				Element apiDataElement1 = apiParamElement1.element("apiData");
+				if (apiDataElement1 == null) {
+					apiDataElement1 = DocumentHelper.createElement("apiData");
+					apiDataElement1.setText("null");
+					apiParamElement1.add(apiDataElement1);
+				}
+				boolean isRest = false;
+				Element apiTypeElement1 = apiParamElement1.element("apiType");
+				if (apiTypeElement1 != null) {
+					String apiTypeValue1 = apiTypeElement1.attributeValue("value");
+					if ("restParam".equals(apiTypeValue1)) {
+						isRest = true;
+					}
+					apiParamElement1.remove(apiTypeElement1);
+				}
+				apiTypeElement1 = DocumentHelper.createElement("apiType");
+				if (isRest) {
+					apiTypeElement1.addAttribute("value", "restParam");
+				} else {
+					apiTypeElement1.addAttribute("value", "any");
+				}
+				apiParamElement1.add(apiTypeElement1);
+				Element apiOperationClassifierElement1 = apiParamElement1.element("apiOperationClassifier");
+				if (apiOperationClassifierElement1 != null) {
+					apiParamElement1.remove(apiOperationClassifierElement1);
+				}
+				result.add(apiParamElement1);
+				if (isRest) {
+					// nothing after rest
+					break;
+				}
+				continue;
+			}
+
+			String paramName = "param" + i;
+			boolean isRest = false;
+			Element apiTypeElement1 = apiParamElement1.element("apiType");
+			if (apiTypeElement1 != null) {
+				String apiTypeValue1 = apiTypeElement1.attributeValue("value");
+				if ("restParam".equals(apiTypeValue1)) {
+					isRest = true;
+					Element apiItemNameElement1 = apiParamElement1.element("apiItemName");
+					if (apiItemNameElement1 != null) {
+						// keep the existing name
+						paramName = apiItemNameElement1.getTextTrim();
+					}
+				}
+			}
+			Element apiTypeElement2 = apiParamElement2.element("apiType");
+			if (apiTypeElement2 != null) {
+				String apiTypeValue2 = apiTypeElement2.attributeValue("value");
+				if ("restParam".equals(apiTypeValue2)) {
+					isRest = true;
+					Element apiItemNameElement2 = apiParamElement2.element("apiItemName");
+					if (apiItemNameElement2 != null) {
+						// keep the existing name
+						paramName = apiItemNameElement2.getTextTrim();
+					}
+				}
+			}
+			Element newApiParamElement = DocumentHelper.createElement("apiParam");
+			Element apiItemNameElement = DocumentHelper.createElement("apiItemName");
+			apiItemNameElement.setText(paramName);
+			newApiParamElement.add(apiItemNameElement);
+			Element newApiTypeElement = DocumentHelper.createElement("apiType");
+			if (isRest) {
+				newApiTypeElement.addAttribute("value", "restParam");
+			} else {
+				newApiTypeElement.addAttribute("value", "any");
+			}
+			newApiParamElement.add(newApiTypeElement);
+			if (!isRest) {
+				Element newApiDataElement = DocumentHelper.createElement("apiData");
+				newApiDataElement.setText("null");
+				newApiParamElement.add(newApiDataElement);
+			}
+			result.add(newApiParamElement);
+			if (isRest) {
+				// nothing after rest
+				break;
+			}
+		}
+		return result;
+	}
+
+	private String parseReturnOrParamType(Element apiTypeElement, String contextClassName) throws Exception {
+		String apiTypeValue = apiTypeElement.attributeValue("value");
+		if ("restParam".equals(apiTypeValue)) {
+			return null;
+		}
+		if ("any".equals(apiTypeValue)) {
+			return "*";
+		}
+		if ("T".equals(apiTypeValue)) {
+			return "T";
+		}
+		if ("void".equals(apiTypeValue)) {
+			return "void";
+		}
+		if (apiTypeValue.startsWith("Vector$")) {
+			String[] parts = apiTypeValue.split("\\$");
+			String vectorItemType = parts[1];
+			vectorItemType = vectorItemType.replace(":", ".");
+			if (contextClassName != null && contextClassName.startsWith("__AS3__.vec.Vector$")
+					&& vectorItemType.equals("T")) {
+				return contextClassName;
+			}
+			return "Vector.<" + vectorItemType + ">";
+		} else {
+			throw new Exception("Unknown apiType value: " + apiTypeValue);
+		}
+	}
+
+	private boolean isConstructorThatNeedsParamsTypedAsAny(String contextClassName, String contextFunctionName) {
+		if (!contextFunctionName.equals(contextClassName)) {
+			return false;
+		}
+		return ANY_CONSTRUCTORS.contains(contextFunctionName);
+	}
+
+	private boolean isMethodThatNeedsParamsTypedAsAny(String contextClassName, String contextFunctionName) {
+		if (!ANY_METHODS.containsKey(contextClassName)) {
+			return false;
+		}
+		return ANY_METHODS.get(contextClassName).contains(contextFunctionName);
+	}
+
+	private boolean isMethodThatNeedsParamsWithDefaultNull(String contextClassName, String contextFunctionName) {
+		if (!NULL_DEFAULT_METHODS.containsKey(contextClassName)) {
+			return false;
+		}
+		return NULL_DEFAULT_METHODS.get(contextClassName).contains(contextFunctionName);
+	}
+
+	private boolean isMethodThatNeedsRestParamOnly(String contextClassName, String contextFunctionName) {
+		if (!REST_METHODS.containsKey(contextClassName)) {
+			return false;
+		}
+		return REST_METHODS.get(contextClassName).contains(contextFunctionName);
+	}
+
+	private boolean isVariableTypedAsAny(String contextClassName, String contextVariableName) {
+		if (!ANY_VARIABLES.containsKey(contextClassName)) {
+			return false;
+		}
+		return ANY_VARIABLES.get(contextClassName).contains(contextVariableName);
+	}
+
+	private boolean isVariableThatShouldBeWritable(String contextClassName, String contextVariableName) {
+		if (!WRITABLE_VARIABLES.containsKey(contextClassName)) {
+			return false;
+		}
+		return WRITABLE_VARIABLES.get(contextClassName).contains(contextVariableName);
+	}
+
+	private void parseParameters(List<Element> apiParamElements, String contextClassName, String contextFunctionName,
+			StringBuilder functionBuilder) throws Exception {
+		boolean forceOptionalConstructor = isConstructorThatNeedsParamsTypedAsAny(contextClassName,
+				contextFunctionName);
+		boolean forceRest = isMethodThatNeedsRestParamOnly(contextClassName, contextFunctionName);
+		boolean forceAnyType = isMethodThatNeedsParamsTypedAsAny(contextClassName, contextFunctionName);
+		boolean forceNullDefault = isMethodThatNeedsParamsWithDefaultNull(contextClassName, contextFunctionName);
+		for (int i = 0; i < apiParamElements.size(); i++) {
+			if (i > 0) {
+				functionBuilder.append(", ");
+			}
+			Element apiParamElement = apiParamElements.get(i);
+			Element apiTypeElement = apiParamElement.element("apiType");
+			String paramType = null;
+			if (forceRest) {
+				functionBuilder.append("...args");
+				break;
+			} else {
+				if (apiTypeElement != null) {
+					String apiTypeValue = apiTypeElement.attributeValue("value");
+					if ("restParam".equals(apiTypeValue)) {
+						functionBuilder.append("...");
+					}
+					paramType = parseReturnOrParamType(apiTypeElement, contextClassName);
+				}
+				Element apiItemNameElement = apiParamElement.element("apiItemName");
+				if (apiItemNameElement == null) {
+					throw new Exception("apiItemName not found");
+				}
+				functionBuilder.append(apiItemNameElement.getTextTrim());
+				if (forceOptionalConstructor) {
+					// workaround for missing data in asdoc dita
+					functionBuilder.append(":* = null");
+				} else {
+					Element apiOperationClassifierElement = apiParamElement.element("apiOperationClassifier");
+					if (apiOperationClassifierElement != null) {
+						paramType = apiOperationClassifierElement.getTextTrim();
+						paramType = paramType.replace(":", ".");
+					}
+					if (forceAnyType) {
+						paramType = "*";
+					}
+					if (paramType != null) {
+						functionBuilder.append(":");
+						functionBuilder.append(paramType);
+					}
+					Element apiDataElement = apiParamElement.element("apiData");
+					if (forceNullDefault) {
+						functionBuilder.append(" = null");
+					} else if (apiDataElement != null) {
+						writeVariableOrParameterValue(apiDataElement, paramType, functionBuilder);
+					} else if (("int".equals(contextClassName) || "uint".equals(contextClassName))
+							&& "toString".equals(contextFunctionName)) {
+						functionBuilder.append(" = 10");
+					}
+				}
+			}
+		}
+	}
+
+	private void writeVariableOrParameterValue(Element apiDataElement, String varType, StringBuilder builder) {
+		builder.append(" = ");
+		String paramValue = apiDataElement.getTextTrim();
+		if ("unknown".equals(paramValue)) {
+			paramValue = "null";
+		}
+		boolean isString = ("String".equals(varType) || paramValue.matches("[A-Za-z\\*]+"))
+				&& !"undefined".equals(paramValue) && !"null".equals(paramValue) && !"NaN".equals(paramValue)
+				&& !"true".equals(paramValue) && !"false".equals(paramValue);
+		if (isString) {
+			builder.append("\"");
+		}
+		builder.append(paramValue);
+		if (isString) {
+			builder.append("\"");
+		}
+	}
+
+	private void collectImport(String fullyQualifiedName, String forPackage, Set<String> result) throws Exception {
+		String[] parts = fullyQualifiedName.split(":");
+		if (parts.length == 1) {
+			// top-level package
+			return;
+		}
+		String packageName = parts[0];
+		if (packageName.equals(forPackage)) {
+			// same package
+			return;
+		}
+		result.add(packageName + "." + parts[1]);
+	}
+
+	private void collectImports(Element element, String forPackage, Set<String> result) throws Exception {
+		String elementName = element.getName();
+		if ("apiClassifier".equals(elementName)) {
+			String className = element.element("apiName").getTextTrim();
+
+			Element apiClassifierDetailElement = element.element("apiClassifierDetail");
+			if (apiClassifierDetailElement == null) {
+				throw new Exception("apiClassifierDetail not found for: " + className);
+			}
+			Element apiClassifierDefElement = apiClassifierDetailElement.element("apiClassifierDef");
+			if (apiClassifierDefElement == null) {
+				throw new Exception("apiClassifierDef not found for: " + className);
+			}
+
+			Element apiBaseClassifierElement = apiClassifierDefElement.element("apiBaseClassifier");
+			if (apiBaseClassifierElement != null) {
+				String baseClassType = apiBaseClassifierElement.getTextTrim();
+				collectImport(baseClassType, forPackage, result);
+			}
+
+			List<Element> apiBaseInterfaceElements = apiClassifierDefElement.elements("apiBaseInterface");
+			for (Element apiBaseInterfaceElement : apiBaseInterfaceElements) {
+				String interfaceType = apiBaseInterfaceElement.getTextTrim();
+				collectImport(interfaceType, forPackage, result);
+			}
+
+			Element apiConstructorElement = element.element("apiConstructor");
+			if (apiConstructorElement != null) {
+				collectImports(apiConstructorElement, forPackage, result);
+			}
+
+			List<Element> apiOperationElements = element.elements("apiOperation");
+			for (Element apiOperationElement : apiOperationElements) {
+				collectImports(apiOperationElement, forPackage, result);
+			}
+
+			List<Element> apiValueElements = element.elements("apiValue");
+			for (Element apiValueElement : apiValueElements) {
+				collectImports(apiValueElement, forPackage, result);
+			}
+		}
+		if ("apiOperation".equals(elementName)) {
+			boolean isAIROnly = isAIROnly(element.element("prolog"));
+			if (isAIROnly && !configuration.getAir()) {
+				return;
+			}
+
+			String functionName = element.element("apiName").getTextTrim();
+
+			Element apiOperationDetailElement = element.element("apiOperationDetail");
+			if (apiOperationDetailElement == null) {
+				throw new Exception("apiOperationDetail not found for: " + functionName);
+			}
+			Element apiOperationDefElement = apiOperationDetailElement.element("apiOperationDef");
+			if (apiOperationDefElement == null) {
+				throw new Exception("apiOperationDef not found for: " + functionName);
+			}
+
+			Element apiReturnElement = apiOperationDefElement.element("apiReturn");
+			if (apiReturnElement != null) {
+				Element apiTypeElement = apiOperationDefElement.element("apiType");
+				if (apiTypeElement != null) {
+					String apiTypeValue = apiTypeElement.attributeValue("value");
+					if (apiTypeValue.startsWith("Vector$")) {
+						String[] parts = apiTypeValue.split("\\$");
+						String vectorItemType = parts[1];
+						collectImport(vectorItemType, forPackage, result);
+					}
+				}
+				Element apiOperationClassifierElement = apiReturnElement.element("apiOperationClassifier");
+				if (apiOperationClassifierElement != null) {
+					String returnType = apiOperationClassifierElement.getTextTrim();
+					collectImport(returnType, forPackage, result);
+				}
+			}
+
+			List<Element> apiParamElements = apiOperationDefElement.elements("apiParam");
+			for (Element apiParamElement : apiParamElements) {
+				Element apiTypeElement = apiParamElement.element("apiType");
+				if (apiTypeElement != null) {
+					String apiTypeValue = apiTypeElement.attributeValue("value");
+					if (apiTypeValue.startsWith("Vector$")) {
+						String[] parts = apiTypeValue.split("\\$");
+						String vectorItemType = parts[1];
+						collectImport(vectorItemType, forPackage, result);
+					}
+				}
+				Element apiOperationClassifierElement = apiParamElement.element("apiOperationClassifier");
+				if (apiOperationClassifierElement != null) {
+					String paramType = apiOperationClassifierElement.getTextTrim();
+					collectImport(paramType, forPackage, result);
+				}
+			}
+		}
+		if ("apiConstructor".equals(elementName)) {
+			String functionName = element.element("apiName").getTextTrim();
+
+			Element aapiConstructorDetailElement = element.element("apiConstructorDetail");
+			if (aapiConstructorDetailElement == null) {
+				throw new Exception("apiConstructor not found for: " + functionName);
+			}
+			Element apiConstructorDefElement = aapiConstructorDetailElement.element("apiConstructorDef");
+			if (apiConstructorDefElement == null) {
+				throw new Exception("apiConstructorDef not found for: " + functionName);
+			}
+
+			List<Element> apiParamElements = apiConstructorDefElement.elements("apiParam");
+			for (Element apiParamElement : apiParamElements) {
+				Element apiTypeElement = apiParamElement.element("apiType");
+				if (apiTypeElement != null) {
+					String apiTypeValue = apiTypeElement.attributeValue("value");
+					if (apiTypeValue.startsWith("Vector$")) {
+						String[] parts = apiTypeValue.split("\\$");
+						String vectorItemType = parts[1];
+						collectImport(vectorItemType, forPackage, result);
+					}
+				}
+				Element apiOperationClassifierElement = apiParamElement.element("apiOperationClassifier");
+				if (apiOperationClassifierElement != null) {
+					String paramType = apiOperationClassifierElement.getTextTrim();
+					collectImport(paramType, forPackage, result);
+				}
+			}
+		}
+		if ("apiValue".equals(elementName)) {
+			boolean isAIROnly = isAIROnly(element.element("prolog"));
+			if (isAIROnly && !configuration.getAir()) {
+				return;
+			}
+
+			String variableName = element.element("apiName").getTextTrim();
+
+			Element apiValueDetailElement = element.element("apiValueDetail");
+			if (apiValueDetailElement == null) {
+				throw new Exception("apiValueDetail not found for: " + variableName);
+			}
+			Element apiValueDefElement = apiValueDetailElement.element("apiValueDef");
+			if (apiValueDefElement == null) {
+				throw new Exception("apiValueDef not found for: " + variableName);
+			}
+
+			Element apiValueClassifierElement = apiValueDefElement.element("apiValueClassifier");
+			if (apiValueClassifierElement != null) {
+				String variableType = apiValueClassifierElement.getTextTrim();
+				collectImport(variableType, forPackage, result);
+			}
+		}
+	}
+
+	private void writeImports(Set<String> imports, StringBuilder builder) {
+		for (String importName : imports) {
+			builder.append("\t");
+			builder.append("import ");
+			builder.append(importName);
+			builder.append(";");
+			builder.append("\n");
+		}
+		if (imports.size() > 0) {
+			builder.append("\n");
+		}
+	}
+}
\ No newline at end of file
diff --git a/compiler-playerglobalc/src/main/java/org/apache/royale/compiler/clients/PlayerglobalcConfiguration.java b/compiler-playerglobalc/src/main/java/org/apache/royale/compiler/clients/PlayerglobalcConfiguration.java
new file mode 100644
index 0000000..4df4cb9
--- /dev/null
+++ b/compiler-playerglobalc/src/main/java/org/apache/royale/compiler/clients/PlayerglobalcConfiguration.java
@@ -0,0 +1,86 @@
+/*
+ *
+ *  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.clients;
+
+import java.io.File;
+import java.util.Arrays;
+
+import org.apache.royale.compiler.config.Configuration;
+import org.apache.royale.compiler.config.ConfigurationValue;
+import org.apache.royale.compiler.exceptions.ConfigurationException;
+import org.apache.royale.compiler.exceptions.ConfigurationException.CannotOpen;
+import org.apache.royale.compiler.internal.config.annotations.Config;
+import org.apache.royale.compiler.internal.config.annotations.Mapping;
+import org.apache.royale.utils.FilenameNormalization;
+
+public class PlayerglobalcConfiguration extends Configuration
+{
+    private File asdocRoot;
+    private File asRoot;
+
+    public PlayerglobalcConfiguration()
+    {
+    }
+
+    public File getAsRoot()
+    {
+        return asRoot;
+    }
+
+    @Config
+    @Mapping("as-root")
+    public void setASRoot(ConfigurationValue cfgval, String filename) throws CannotOpen
+    {
+        setASRoot(new File(FilenameNormalization.normalize(getOutputPath(cfgval, filename))));
+    }
+
+    public void setASRoot(File file)
+    {
+        this.asRoot = file;
+    }
+
+    public File getASDocRoot()
+    {
+        return asdocRoot;
+    }
+
+    @Config
+    @Mapping("asdoc-root")
+    public void setASDocRoot(ConfigurationValue cfgval, String filename) throws ConfigurationException
+    {
+		assertThatAllPathsAreDirectories(Arrays.asList(filename), cfgval);
+        this.asdocRoot = new File(FilenameNormalization.normalize(filename));
+    }
+
+    private boolean air = false;
+
+    public boolean getAir()
+    {
+        return air;
+    }
+
+    @Config
+    @Mapping("air")
+    public void setAir(ConfigurationValue cv, boolean value)
+            throws ConfigurationException
+    {
+        air = value;
+    }
+}
diff --git a/compiler-playerglobalc/src/main/java/org/apache/royale/compiler/config/PlayerglobalcConfigurator.java b/compiler-playerglobalc/src/main/java/org/apache/royale/compiler/config/PlayerglobalcConfigurator.java
new file mode 100644
index 0000000..6115228
--- /dev/null
+++ b/compiler-playerglobalc/src/main/java/org/apache/royale/compiler/config/PlayerglobalcConfigurator.java
@@ -0,0 +1,55 @@
+/*
+ *
+ *  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.config;
+
+import java.io.File;
+
+import org.apache.royale.compiler.clients.PlayerglobalcConfiguration;
+import org.apache.royale.compiler.exceptions.ConfigurationException;
+
+public class PlayerglobalcConfigurator extends Configurator
+{
+    /**
+     * Constructor
+     */
+    public PlayerglobalcConfigurator()
+    {
+        this(PlayerglobalcConfiguration.class);
+    }
+
+    /**
+     * Constructor
+     */
+    public PlayerglobalcConfigurator(Class<? extends PlayerglobalcConfiguration> configurationClass)
+    {
+        super(configurationClass);
+    }
+    
+    @Override
+    protected void validateSWCInputs() throws ConfigurationException
+    {
+        PlayerglobalcConfiguration configuration = (PlayerglobalcConfiguration) getConfiguration();
+		File asdocRoot = configuration.getASDocRoot();
+        if (asdocRoot == null || !asdocRoot.exists())
+        {
+            throw new ConfigurationException.NoSwcInputs( null, null, -1 );
+        }
+    }
+}
diff --git a/compiler-playerglobalc/src/main/resources/downloads.xml b/compiler-playerglobalc/src/main/resources/downloads.xml
new file mode 100644
index 0000000..4b070e4
--- /dev/null
+++ b/compiler-playerglobalc/src/main/resources/downloads.xml
@@ -0,0 +1,364 @@
+<?xml version="1.0"?>
+<!--
+
+  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.
+
+-->
+<project name="downloads" default="main" basedir=".">
+    <echo>basedir is ${basedir}</echo>
+    <echo>ROYALE_COMPILER_HOME is ${ROYALE_COMPILER_HOME}</echo>
+    
+  <!--
+      Notes:
+          For Apache, the JARS must be removed from the repository.
+
+          Licenses:
+              dom4j (1.6.1) - BSD
+  -->
+
+  <!-- this script supports the usingDownloadCache property and
+       downloadCacheFolder property to cache downloads in the
+       folder specified by downloadCacheFolder.  This can make
+       a huge difference in future runs although there is some
+       risk around caching bad downloads and/or needing to
+       clean up the cache -->
+
+  <property name="ROYALE_COMPILER_HOME" location="${basedir}/../../../../compiler-jx"/>
+  <echo>ROYALE_COMPILER_HOME is ${ROYALE_COMPILER_HOME}</echo>
+
+  <property name="lib.dir" value="${ROYALE_COMPILER_HOME}/lib"/>
+  <property name="download.dir" value="${ROYALE_COMPILER_HOME}/in"/>
+
+  <property file="${ROYALE_COMPILER_HOME}/local.properties"/>
+
+  <property name="maven.search.url" value="https://repo1.maven.org/maven2"/>
+
+  <property file="${ROYALE_COMPILER_HOME}/env.properties"/>
+  <property environment="env"/>
+  <property file="${ROYALE_COMPILER_HOME}/local.properties"/>
+  <property file="${ROYALE_COMPILER_HOME}/build.properties"/>
+
+
+  <!--
+      Because the downloads requires a network connection and the JARs don't change very often,
+      they are each downloaded only if they don't already exist. 
+  -->
+  <target name="main" depends="prepare, all" description="Downloads all the required thirdparty JARs"/>
+  
+  <target name="prepare">
+    <echo message="Making lib directory ${lib.dir}"/>
+    <mkdir dir="${lib.dir}"/>
+  </target>
+
+  <!--
+      Downloads
+  -->
+
+  <target name="all" description="Downloads and copies all dependencies to the lib directory.">
+
+    <!--  dom4j -->
+    <property name="dom4j.name" value="dom4j"/>
+    <property name="dom4j.version" value="1.6.1"/>
+    <antcall target="download-dependency">
+      <param name="name" value="${dom4j.name}"/>
+      <param name="src.server" value="${maven.search.url}"/>
+      <param name="src.folder" value="dom4j/dom4j/${dom4j.version}"/>
+      <param name="src.filename" value="dom4j-${dom4j.version}.jar"/>
+      <param name="src.checksum" value="4d8f51d3fe3900efc6e395be48030d6d"/>
+      <param name="dest.folder" value=""/>
+      <param name="dest.filename" value="${dom4j.name}.jar"/>
+      <param name="license.use.url" value="https://raw.githubusercontent.com/dom4j/dom4j/master/LICENSE"/>
+      <param name="license.cacheName" value="dom4j-LICENSE.txt"/>
+    </antcall>
+  </target>
+
+
+
+  <!--
+      Utilities
+  -->
+
+  <target name="check-dependency" description="Checks if project jar is in lib directory.">
+    <echo>checking for ${lib.dir}/${dest.folder}/${name}.jar</echo>
+    <available file="${lib.dir}/${dest.folder}/${name}.jar" property="project.jar.exists"/>
+  </target>
+
+  <target name="echo-project-jar">
+    <echo file="${basedir}/project.properties">project.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
+    <replace file="${basedir}/project.properties" token="{0}" value="${srcPath}"/>
+    <replace file="${basedir}/project.properties" token="{1}" value="${srcDomain}"/>
+    <property file="${basedir}/project.properties"/>
+    <delete file="${basedir}/project.properties"/>
+    <echo>${project.echo}</echo>
+  </target>
+  
+  <target name="download-dependency" depends="check-dependency" unless="project.jar.exists" description="Downloads a jar + license to the lib directory.">
+    <antcall target="echo-project-jar">
+      <param name="srcDomain" value="${src.server}"/>
+      <param name="srcPath" value="${src.folder}/${src.filename}"/>
+    </antcall>
+    <mkdir dir="${lib.dir}/${dest.folder}"/>
+
+    <antcall target="download-apache-license" />
+    <antcall target="download-other-license" />
+
+    <!-- ant_on_air in Installer 3.1 doesn't support 'or' yet -->
+    <condition property="project.download.jar">
+      <and>
+          <not>
+              <contains string="${src.filename}" substring=".tar" />
+          </not>
+          <not>
+              <contains string="${src.filename}" substring=".zip" />
+          </not>
+      </and>
+    </condition>
+    
+    <antcall target="download-dependency-jar">
+      <param name="server" value="${src.server}"/>
+      <param name="folder" value="${src.folder}"/>
+      <param name="srcFileName" value="${src.filename}"/>
+      <param name="destDir" value="${lib.dir}/${dest.folder}"/>
+      <param name="destFile" value="${dest.filename}"/>
+      <param name="checksum" value="${src.checksum}"/>
+    </antcall>
+
+    <antcall target="download-dependency-zip">
+      <param name="server" value="${src.server}"/>
+      <param name="folder" value="${src.folder}"/>
+      <param name="srcFileName" value="${src.filename}"/>
+      <param name="srcJarPath" value="${src.jarPath}"/>
+      <param name="destDir" value="${lib.dir}/${dest.folder}"/>
+      <param name="destFile" value="${dest.filename}"/>
+      <param name="checksum" value="${src.checksum}"/>
+    </antcall>
+  </target>
+
+  <target name="download-apache-license" if="license.use.apache" description="Downloads the Apache license to the lib directory.">
+    <get src="http://www.apache.org/licenses/LICENSE-2.0" dest="${lib.dir}/${dest.folder}/${name}-LICENSE.html" ignoreerrors="true"/>
+    <antcall target="get-from-cache-if-needed" >
+        <param name="srcFile" value="LICENSE-2.0.html" />
+        <param name="destFile" value="${name}-LICENSE.html" />
+        <param name="destDir" value="${lib.dir}/${dest.folder}" />
+    </antcall>
+    <antcall target="fail-if-not-found" >
+        <param name="destFile" value="${name}-LICENSE.html" />
+        <param name="destDir" value="${lib.dir}/${dest.folder}" />
+    </antcall>
+  </target>
+  
+  <target name="download-other-license" if="license.use.url" description="Downloads a non-Apache license to the lib directory.">
+    <get src="${license.use.url}" dest="${lib.dir}/${dest.folder}/${name}-LICENSE.txt" ignoreerrors="true"/>
+    <antcall target="get-from-cache-if-needed" >
+        <param name="srcFile" value="${license.cacheName}" />
+        <param name="destFile" value="${name}-LICENSE.txt" />
+        <param name="destDir" value="${lib.dir}/${dest.folder}" />
+    </antcall>
+    <antcall target="fail-if-not-found" >
+        <param name="destFile" value="${name}-LICENSE.txt" />
+        <param name="destDir" value="${lib.dir}/${dest.folder}" />
+    </antcall>
+  </target>
+  
+  <target name="download-dependency-jar" if="project.download.jar" description="Downloads a jar to the lib directory.">
+    <antcall target="download-jar">
+      <param name="srcDomain" value="${server}"/>
+      <param name="srcFolder" value="${folder}"/>
+      <param name="cacheFolder" value="${folder}"/>
+      <param name="srcFile" value="${srcFileName}"/>
+      <param name="md5" value="${checksum}"/>
+    </antcall>
+  </target>
+
+  <target name="download-dependency-zip" unless="project.download.jar" description="Downloads a zip to the lib directory.">
+    <antcall target="download-zip">
+      <param name="srcDomain" value="${server}"/>
+      <param name="srcFolder" value="${folder}"/>
+      <param name="srcFile" value="${srcFileName}"/>
+      <param name="srcJarPath" value="${srcJarPath}"/>
+      <param name="md5" value="${checksum}"/>
+    </antcall>
+  </target>
+    
+  <!--
+      Download a zip or gz file, extracts the jar file, and optionally copies the jar
+      file to a different location and optinally verifies the checksum and optionally
+      caches the file, and optionally pulls the file from the cache instead of downloading.  
+      If the checksum fails, this script fails.
+
+      Params are:
+          srcDomain - the domain
+          srcFolder - path to file
+          srcFile - a .gz file for untar with gzip, else unzip
+          [md5]
+          [srcJarPath] - both src and dest required for the copy
+          [destJarFile]
+
+      Note: This is purposely coded without <if><else><then> so that a dependency on
+      ant-contrib.jar isn't required.        
+  -->
+  <target name="download-zip" depends="check-cache" description="Downloads tar/zip, and optionally verifies checksum and copies extracted jar.">
+    <mkdir dir="${download.dir}"/>
+    <antcall target="get-if-not-cached">
+      <param name="destDir" value="${download.dir}"/>
+      <param name="destFile" value="${srcFile}"/>
+      <param name="message" value="Checksum mismatch for ${download.dir}/${srcFile}"/>
+    </antcall>
+    <antcall target="copy-if-cached">
+      <param name="destDir" value="${download.dir}"/>
+      <param name="destFile" value="${srcFile}"/>
+    </antcall>
+    <condition property="zip.compressed">
+      <matches string="${srcFile}" pattern="^*.zip$"/>
+    </condition>
+    <antcall target="untar-file"/>
+    <antcall target="unzip-file"/>
+    <condition property="destination.known">
+      <and>
+        <isset property="srcJarPath"/>
+        <isset property="destDir"/>
+        <isset property="destFile"/>
+      </and>
+    </condition>
+    <antcall target="copy-downloaded-jar"/>
+  </target>
+
+  <target name="download-bz2" depends="check-cache" description="Downloads bz2, and optionally verifies checksum and copies extracted jar.">
+    <mkdir dir="${download.dir}"/>
+    <antcall target="get-if-not-cached">
+      <param name="dest" value="${download.dir}/${srcFile}"/>
+      <param name="message" value="Checksum mismatch for ${download.dir}/${srcFile}"/>
+    </antcall>
+    <antcall target="copy-if-cached">
+      <param name="dest" value="${download.dir}/${srcFile}"/>
+    </antcall>
+    <untar src="${download.dir}/${srcFile}" dest="${download.dir}/temp" compression="bzip2"/>
+    <condition property="destination.known">
+      <and>
+        <isset property="srcJarPath"/>
+        <isset property="destJarFile"/>
+      </and>
+    </condition>
+    <antcall target="copy-downloaded-jar"/>
+  </target>
+
+  <!--
+      Download a jar file and optionally verify the checksum.
+      If the checksum fails, this script fails.
+        
+      Params are:
+          srcDomain
+          srcFolder
+          srcFile
+          destJarFile
+          [md5]
+  -->
+  <target name="download-jar" depends="check-cache" description="Downloads jar, and optionally verifies checksum.">
+    <antcall target="get-if-not-cached">
+      <param name="message" value="Checksum mismatch for ${destJarFile}"/>
+    </antcall>
+    <antcall target="copy-if-cached" />
+  </target>
+
+  <target name="untar-file" unless="zip.compressed" description="Untars zipFile">
+    <untar src="${download.dir}/${srcFile}" dest="${download.dir}/temp" compression="gzip"/>
+  </target>
+
+  <target name="unzip-file" if="zip.compressed" description="Unzips zipFile">
+    <unzip src="${download.dir}/${srcFile}" dest="${download.dir}/temp"/>
+  </target>
+
+  <target name="get-if-not-cached" unless="found-in-cache">
+    <get src="${srcDomain}/${srcFolder}/${srcFile}" dest="${destDir}/${destFile}" ignoreerrors="true"/>
+    <!-- this is a different cache for the CI servers.  It tries the network first, then the cache if failure -->
+    <antcall target="get-from-cache-if-needed" />
+    <antcall target="fail-if-not-found" />
+    <antcall target="check-sum">
+      <param name="message" value="Checksum mismatch for ${destDir}/${destFile}"/>
+    </antcall>
+    <antcall target="put-in-cache"/>
+  </target>
+
+  <target name="copy-if-cached" if="found-in-cache">
+    <!-- this string comes from the Royale en_US.properties because for now, this
+         target won't get called unless this script is called from the Royale install -->
+    <echo>${INFO_USING_CACHED_FILE} ${downloadCacheFolder}/${srcFolder}/${srcFile}</echo>
+    <copy file="${downloadCacheFolder}/${srcFolder}/${srcFile}" tofile="${destDir}/${destFile}" overwrite="true"/>
+  </target>
+
+  <target name="check-cache" if="usingDownloadCache">
+      <echo>${downloadCacheFolder} ${srcFolder} ${srcFile}</echo>
+    <available file="${downloadCacheFolder}/${srcFolder}/${srcFile}" property="found-in-cache"/>
+  </target>
+
+  <target name="put-in-cache" if="usingDownloadCache">
+    <copy tofile="${downloadCacheFolder}/${srcFolder}/${srcFile}" file="${destDir}/${destFile}"/>
+  </target>
+
+  <target name="check-sum" if="md5" description="Verifies MD5 checksum, and fails if checksum doesn't match">
+    <checksum file="${destDir}/${destFile}" algorithm="MD5" verifyproperty="we.failed" property="${md5}"/>
+    <fail message="${message}">
+      <condition>
+        <equals arg1="${we.failed}" arg2="false"/>
+      </condition>
+    </fail>
+  </target>
+
+  <target name="copy-downloaded-jar" if="destination.known">
+    <mkdir dir="${lib.dir}"/>
+    <copy file="${download.dir}/temp/${srcJarPath}" toFile="${destDir}/${destFile}" verbose="true"/>
+  </target>
+
+  <target name="fail-with-message" if="we.failed" description="Conditionally fails with the specified message">
+    <fail message="${message}"/>
+  </target>
+
+    <target name="fail-if-not-found">
+        <fail message="${destDir}/${destFile} could not be downloaded or found in cache">
+            <condition>
+                <not>
+                    <available file="${destDir}/${destFile}" />
+                </not>
+            </condition>
+        </fail>
+    </target>
+
+    <target name="double-check-file" >
+        <echo>${env.ROYALE_DOWNLOAD_CACHE}</echo>
+        <condition property="still-no-file" value="true">
+            <and>
+                <not>
+                    <available file="${destDir}/${destFile}" />
+                </not>
+                <isset property="env.ROYALE_DOWNLOAD_CACHE" />
+            </and>
+        </condition>
+        <echo>Need file: ${still_no_file}</echo>
+    </target>
+    <target name="get-from-cache-if-needed" depends="double-check-file" if="still-no-file">
+        <copy file="${env.ROYALE_DOWNLOAD_CACHE}/${srcFile}" tofile="${destDir}/${destFile}" />
+    </target>
+
+
+  <!--
+      Cleanup
+  -->
+  <target name="clean" description="Removes thirdparty downloads.">
+    <delete failonerror="false" includeEmptyDirs="true">
+      <fileset dir="${download.dir}"/>
+    </delete>
+  </target>
+</project>
diff --git a/compiler-test-utils/pom.xml b/compiler-test-utils/pom.xml
index 9ab6633..297abc0 100644
--- a/compiler-test-utils/pom.xml
+++ b/compiler-test-utils/pom.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>

+<?xml version="1.0" encoding="UTF-8"?>
 <!--
 
   Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,39 +16,39 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 
---><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

-  <modelVersion>4.0.0</modelVersion>

-

-  <parent>

-    <groupId>org.apache.royale.compiler</groupId>

-    <artifactId>royale-compiler-parent</artifactId>

-    <version>0.9.7</version>

-  </parent>

-

-  <artifactId>compiler-test-utils</artifactId>

-  <version>0.9.7</version>

-

-  <name>Apache Royale: Compiler: Test Utils</name>

-  <description>

-    Shared test code, which is needed by the compiler and the compiler-jx test-suites.

-  </description>

-

-  <dependencies>

-    <dependency>

-      <groupId>org.apache.commons</groupId>

-      <artifactId>commons-compress</artifactId>

-      <version>1.10</version>

-    </dependency>

-    <dependency>

-      <groupId>commons-io</groupId>

-      <artifactId>commons-io</artifactId>

-      <version>2.4</version>

-    </dependency>

-    <dependency>

-      <groupId>junit</groupId>

-      <artifactId>junit</artifactId>

-      <version>4.10</version>

-    </dependency>

-  </dependencies>

-

-<properties><project.build.outputTimestamp>2020-05-07T15:02:12Z</project.build.outputTimestamp></properties></project>

+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.royale.compiler</groupId>
+    <artifactId>royale-compiler-parent</artifactId>
+    <version>0.9.8</version>
+  </parent>
+
+  <artifactId>compiler-test-utils</artifactId>
+  <version>0.9.8</version>
+
+  <name>Apache Royale: Compiler: Test Utils</name>
+  <description>
+    Shared test code, which is needed by the compiler and the compiler-jx test-suites.
+  </description>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-compress</artifactId>
+      <version>1.10</version>
+    </dependency>
+    <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
+      <version>2.4</version>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.10</version>
+    </dependency>
+  </dependencies>
+
+<properties /></project>
diff --git a/compiler/build.xml b/compiler/build.xml
index bca3b89..3348d3e 100644
--- a/compiler/build.xml
+++ b/compiler/build.xml
@@ -202,6 +202,25 @@
     </macrodef>
 
     <!--
+        Defines an <order.switches file="..."> macro
+        used for ordering the switch statement generated by
+        JFlex in order to get reproducible builds.
+    -->
+    <macrodef name="order.switches">
+        <attribute name="file"/>
+        <sequential>
+            <java classname="org.apache.royale.compiler.tools.annotate.OrderSwitches" fork="false">
+                <classpath>
+                    <path refid="classpath"/>
+                    <pathelement location="${compiler}/../compiler-build-tools/target/classes"/>
+                    <pathelement location="${compiler}/target/classes"/>
+                </classpath>
+                <arg value="@{file}"/>
+            </java>
+        </sequential>
+    </macrodef>
+
+    <!--
 
         SETUP
 
@@ -237,6 +256,7 @@
         <jflex input="${compiler}/src/main/jflex/org/apache/royale/compiler/internal/parsing/as/RawASTokenizer.lex"
                skeleton="${compiler}/src/main/jflex/org/apache/royale/compiler/internal/parsing/as/skeleton.royale"
                output="${compiler}/target/generated-sources/jflex/org/apache/royale/compiler/internal/parsing/as"/>
+        <order.switches file="${compiler}/target/generated-sources/jflex/org/apache/royale/compiler/internal/parsing/as/RawASTokenizer.java" />
 	</target>
 	
     <target name="set.raw.asdoc.tokenizer.uptodate">
@@ -254,6 +274,7 @@
         <echo message="Generating RawASDocTokenizer"/>
         <jflex input="${compiler}/src/main/jflex/org/apache/royale/compiler/internal/parsing/as/RawASDocTokenizer.lex"
                output="${compiler}/target/generated-sources/jflex/org/apache/royale/compiler/internal/parsing/as"/>
+        <order.switches file="${compiler}/target/generated-sources/jflex/org/apache/royale/compiler/internal/parsing/as/RawASDocTokenizer.java" />
     </target>
 
     <target name="set.raw.mxml.tokenizer.uptodate">
@@ -271,6 +292,7 @@
         <echo message="Generating RawMXMLTokenizer"/>
         <jflex input="${compiler}/src/main/jflex/org/apache/royale/compiler/internal/parsing/mxml/RawMXMLTokenizer.lex"
                output="${compiler}/target/generated-sources/jflex/org/apache/royale/compiler/internal/parsing/mxml"/>
+        <order.switches file="${compiler}/target/generated-sources/jflex/org/apache/royale/compiler/internal/parsing/mxml/RawMXMLTokenizer.java" />
     </target>
 
 	<target name="jflex" depends="raw.as.tokenizer, raw.asdoc.tokenizer, raw.mxml.tokenizer"
diff --git a/compiler/pom.xml b/compiler/pom.xml
index a3eaf94..ef3d44e 100644
--- a/compiler/pom.xml
+++ b/compiler/pom.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>

+<?xml version="1.0" encoding="UTF-8"?>
 <!--
 
   Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,615 +16,644 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 
---><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

-  <modelVersion>4.0.0</modelVersion>

-

-  <parent>

-    <groupId>org.apache.royale.compiler</groupId>

-    <artifactId>royale-compiler-parent</artifactId>

-    <version>0.9.7</version>

-  </parent>

-

-  <artifactId>compiler</artifactId>

-  <version>0.9.7</version>

-

-  <name>Apache Royale: Compiler: Compiler</name>

-  <description>The Apache Royale Compiler</description>

-

-  <build>

-    <plugins>

-        <plugin>

-          <groupId>org.apache.maven.plugins</groupId>

-          <artifactId>maven-jar-plugin</artifactId>

-          <configuration>

-            <archive>

-              <manifestEntries>

-                <Class-Path>external/closure-compiler-v20181210.jar compiler-common.jar external/antlr-2.7.7.jar external/antlr-3.3.jar external/antlr-runtime-3.3.jar external/commons-cli-1.2.jar external/commons-io-2.4.jar external/guava-25.1-jre.jar external/lzma-sdk-4j-9.22.0.jar external/flex-tool-api-1.0.0.jar ..</Class-Path>

-                <!-- <Class-Path>compiler-common.jar external/antlr.jar external/commons-cli.jar external/commons-io.jar external/guava.jar external/lzma-sdk.jar external/flex-tool-api.jar ..</Class-Path> -->

-              </manifestEntries>

-            </archive>

-          </configuration>

-        </plugin>

-

-        <plugin>

-          <groupId>org.apache.maven.plugins</groupId>

-          <artifactId>maven-resources-plugin</artifactId>

-          <executions>

-            <execution>

-              <id>copy-externc-resources</id>

-              <phase>process-test-resources</phase>

-              <goals>

-                <goal>copy-resources</goal>

-              </goals>

-            <configuration>

-            <outputDirectory>${basedir}/../compiler-externc/target</outputDirectory>

-              <resources>

-                <resource>

-                  <directory>${basedir}/../compiler-externc/src/test/config</directory>

-                </resource>

-              </resources>

-            </configuration>

-          </execution>

-          <execution>

-            <id>copy-custom-resources</id>

-            <phase>process-test-resources</phase>

-            <goals>

-              <goal>copy-resources</goal>

-            </goals>

-            <configuration>

-              <outputDirectory>${basedir}/target</outputDirectory>

-              <resources>

-                <resource>

-                  <directory>${basedir}/src/test/config</directory>

-                </resource>

-              </resources>

-            </configuration>

-          </execution>

-        </executions>

-      </plugin>

+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.royale.compiler</groupId>
+    <artifactId>royale-compiler-parent</artifactId>
+    <version>0.9.8</version>
+  </parent>
+
+  <artifactId>compiler</artifactId>
+  <version>0.9.8</version>
+
+  <name>Apache Royale: Compiler: Compiler</name>
+  <description>The Apache Royale Compiler</description>
+
+  <build>
+    <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-jar-plugin</artifactId>
+          <executions>
+            <execution>
+              <id>default-jar</id>
+              <configuration>
+                <archive>
+                  <manifestEntries>
+                    <!-- These paths are all defined the way the layout will be in the distribution -->
+                    <Class-Path>compiler-common.jar external/antlr.jar external/antlr-runtime.jar external/commons-cli.jar external/commons-io.jar external/guava.jar external/lzma-sdk-4j.jar external/flex-tool-api.jar ..</Class-Path>
+                  </manifestEntries>
+                </archive>
+              </configuration>
+            </execution>
+            <execution>
+              <id>scripts-jar</id>
+              <phase>package</phase>
+              <goals>
+                <goal>jar</goal>
+              </goals>
+              <configuration>
+                <classesDirectory>src/assembly/scripts</classesDirectory>
+                <classifier>scripts</classifier>
+              </configuration>
+            </execution>
+          </executions>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-resources-plugin</artifactId>
+          <executions>
+            <execution>
+              <id>copy-externc-resources</id>
+              <phase>process-test-resources</phase>
+              <goals>
+                <goal>copy-resources</goal>
+              </goals>
+            <configuration>
+            <outputDirectory>${basedir}/../compiler-externc/target</outputDirectory>
+              <resources>
+                <resource>
+                  <directory>${basedir}/../compiler-externc/src/test/config</directory>
+                </resource>
+              </resources>
+            </configuration>
+          </execution>
+          <execution>
+            <id>copy-custom-resources</id>
+            <phase>process-test-resources</phase>
+            <goals>
+              <goal>copy-resources</goal>
+            </goals>
+            <configuration>
+              <outputDirectory>${basedir}/target</outputDirectory>
+              <resources>
+                <resource>
+                  <directory>${basedir}/src/test/config</directory>
+                </resource>
+              </resources>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
       <!--
               Do all the JFlex code generation
-      -->

-      <plugin>

-        <groupId>de.jflex</groupId>

-        <artifactId>maven-jflex-plugin</artifactId>

-        <executions>

-          <execution>

-            <id>generate-raw-as-tokenizer</id>

-            <goals>

-              <goal>generate</goal>

-            </goals>

-            <configuration>

-              <outputDirectory>target/generated-sources/jflex</outputDirectory>

-              <lexDefinitions>

-                <lexDefinition>src/main/jflex/org/apache/royale/compiler/internal/parsing/as/RawASTokenizer.lex</lexDefinition>

-              </lexDefinitions>

-              <skeleton>src/main/jflex/org/apache/royale/compiler/internal/parsing/as/skeleton.royale</skeleton>

-            </configuration>

-          </execution>

-          <execution>

-            <id>generate-raw-as-doc-tokenizer</id>

-            <goals>

-              <goal>generate</goal>

-            </goals>

-            <configuration>

-              <outputDirectory>target/generated-sources/jflex</outputDirectory>

-              <lexDefinitions>

-                <lexDefinition>src/main/jflex/org/apache/royale/compiler/internal/parsing/as/RawASDocTokenizer.lex</lexDefinition>

-              </lexDefinitions>

-              <skeleton>src/main/jflex/org/apache/royale/compiler/internal/parsing/as/skeleton.default</skeleton>

-            </configuration>

-          </execution>

-          <execution>

-            <id>generate-raw-mxml-tokenizer</id>

-            <goals>

-              <goal>generate</goal>

-            </goals>

-            <configuration>

-              <outputDirectory>target/generated-sources/jflex</outputDirectory>

-              <lexDefinitions>

-                <lexDefinition>src/main/jflex/org/apache/royale/compiler/internal/parsing/mxml/RawMXMLTokenizer.lex</lexDefinition>

-              </lexDefinitions>

-            </configuration>

-          </execution>

-        </executions>

-      </plugin>

+      -->
+      <plugin>
+        <groupId>de.jflex</groupId>
+        <artifactId>maven-jflex-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>generate-raw-as-tokenizer</id>
+            <goals>
+              <goal>generate</goal>
+            </goals>
+            <configuration>
+              <outputDirectory>target/generated-sources/jflex</outputDirectory>
+              <lexDefinitions>
+                <lexDefinition>src/main/jflex/org/apache/royale/compiler/internal/parsing/as/RawASTokenizer.lex</lexDefinition>
+              </lexDefinitions>
+              <skeleton>src/main/jflex/org/apache/royale/compiler/internal/parsing/as/skeleton.royale</skeleton>
+            </configuration>
+          </execution>
+          <execution>
+            <id>generate-raw-as-doc-tokenizer</id>
+            <goals>
+              <goal>generate</goal>
+            </goals>
+            <configuration>
+              <outputDirectory>target/generated-sources/jflex</outputDirectory>
+              <lexDefinitions>
+                <lexDefinition>src/main/jflex/org/apache/royale/compiler/internal/parsing/as/RawASDocTokenizer.lex</lexDefinition>
+              </lexDefinitions>
+              <skeleton>src/main/jflex/org/apache/royale/compiler/internal/parsing/as/skeleton.default</skeleton>
+            </configuration>
+          </execution>
+          <execution>
+            <id>generate-raw-mxml-tokenizer</id>
+            <goals>
+              <goal>generate</goal>
+            </goals>
+            <configuration>
+              <outputDirectory>target/generated-sources/jflex</outputDirectory>
+              <lexDefinitions>
+                <lexDefinition>src/main/jflex/org/apache/royale/compiler/internal/parsing/mxml/RawMXMLTokenizer.lex</lexDefinition>
+              </lexDefinitions>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
       <!--
             Do all the Antlr2 code generation
-      -->

-      <plugin>

-        <groupId>org.apache.maven.plugins</groupId>

-        <artifactId>maven-antlr-plugin</artifactId>

-        <executions>

-          <execution>

-            <id>generate-as-parser</id>

-            <goals>

-              <goal>generate</goal>

-            </goals>

-            <configuration>

-              <grammars>org/apache/royale/compiler/internal/parsing/as/ASParser.g</grammars>

-            </configuration>

-          </execution>

-        </executions>

-        <dependencies>

-          <dependency>

-            <groupId>antlr</groupId>

-            <artifactId>antlr</artifactId>

-            <version>2.7.7</version>

-          </dependency>

-        </dependencies>

-      </plugin>

-

+      -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-antlr-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>generate-as-parser</id>
+            <goals>
+              <goal>generate</goal>
+            </goals>
+            <configuration>
+              <grammars>org/apache/royale/compiler/internal/parsing/as/ASParser.g</grammars>
+            </configuration>
+          </execution>
+        </executions>
+        <dependencies>
+          <dependency>
+            <groupId>antlr</groupId>
+            <artifactId>antlr</artifactId>
+            <version>2.7.7</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+
       <!--
           The generation of the metadata-parser requires Antlr to
           load ImportMetadataTokenTypes.txt. Unfortunately Altlr
           looks in the current working directory. The only way to
           force it to work, is to start a new process with the
           working directory in the directory containing the file.
-      -->

-      <plugin>

-        <groupId>org.codehaus.mojo</groupId>

-        <artifactId>exec-maven-plugin</artifactId>

-        <executions>

-          <execution>

-            <id>generate-metadata-parser</id>

-            <phase>generate-sources</phase>

-            <goals>

-              <goal>exec</goal>

-            </goals>

-            <configuration>

-              <executable>java</executable>

-              <arguments>

-                <argument>-classpath</argument>

-                <classpath />

-                <arguments>antlr.Tool</arguments>

-                <argument>-o</argument>

-                <argument>../../../../../../../../../../target/generated-sources/antlr/org/apache/royale/compiler/internal/parsing/as</argument>

-                <argument>MetadataParser.g</argument>

-              </arguments>

-              <workingDirectory>src/main/antlr/org/apache/royale/compiler/internal/parsing/as</workingDirectory>

-              <sourceRoot>target/generated-sources/antlr</sourceRoot>

-            </configuration>

-          </execution>

-          <execution>

-              <id>generate-test-js-typedefs</id>

-              <phase>test-compile</phase>

-              <goals>

-                  <goal>exec</goal>

-              </goals>

-              <configuration>

-                  <executable>java</executable>

-                  <arguments>

-                      <argument>-classpath</argument>

-                      <classpath />

-                      <arguments>org.apache.royale.compiler.clients.EXTERNC</arguments>

-                      <argument>-load-config+=../compiler-externc/src/test/config/externc-config.xml</argument>

-                  </arguments>

-              </configuration>

-          </execution>

-          <execution>

-              <id>generate-test-js-swc</id>

-              <phase>test-compile</phase>

-              <goals>

-                  <goal>exec</goal>

-              </goals>

-              <configuration>

-                  <executable>java</executable>

-                  <arguments>

-                      <argument>-classpath</argument>

-                      <classpath />

-                      <arguments>org.apache.royale.compiler.clients.COMPC</arguments>

-                      <argument>-load-config+=../compiler-externc/target/compile-as-config.xml</argument>

-                      <argument>-output=../compiler-externc/target/js.swc</argument>

-                  </arguments>

-              </configuration>

-          </execution>

-          <execution>

-              <id>generate-test-custom-swc</id>

-              <phase>test-compile</phase>

-              <goals>

-                  <goal>exec</goal>

-              </goals>

-              <configuration>

-                  <executable>java</executable>

-                  <arguments>

-                      <argument>-classpath</argument>

-                      <classpath />

-                      <arguments>org.apache.royale.compiler.clients.COMPC</arguments>

-                      <argument>-load-config+=target/compile-as-config.xml</argument>

-                      <argument>-output=target/custom.swc</argument>

-                  </arguments>

-              </configuration>

-          </execution>

-        </executions>

-      </plugin>

-

+      -->
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>exec-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>generate-metadata-parser</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>exec</goal>
+            </goals>
+            <configuration>
+              <executable>java</executable>
+              <arguments>
+                <argument>-classpath</argument>
+                <classpath />
+                <arguments>antlr.Tool</arguments>
+                <argument>-o</argument>
+                <argument>../../../../../../../../../../target/generated-sources/antlr/org/apache/royale/compiler/internal/parsing/as</argument>
+                <argument>MetadataParser.g</argument>
+              </arguments>
+              <workingDirectory>src/main/antlr/org/apache/royale/compiler/internal/parsing/as</workingDirectory>
+              <sourceRoot>target/generated-sources/antlr</sourceRoot>
+            </configuration>
+          </execution>
+          <execution>
+              <id>generate-test-js-typedefs</id>
+              <phase>test-compile</phase>
+              <goals>
+                  <goal>exec</goal>
+              </goals>
+              <configuration>
+                  <executable>java</executable>
+                  <arguments>
+                      <argument>-classpath</argument>
+                      <classpath />
+                      <arguments>org.apache.royale.compiler.clients.EXTERNC</arguments>
+                      <argument>-load-config+=../compiler-externc/src/test/config/externc-config.xml</argument>
+                  </arguments>
+              </configuration>
+          </execution>
+          <execution>
+              <id>generate-test-js-swc</id>
+              <phase>test-compile</phase>
+              <goals>
+                  <goal>exec</goal>
+              </goals>
+              <configuration>
+                  <executable>java</executable>
+                  <arguments>
+                      <argument>-classpath</argument>
+                      <classpath />
+                      <arguments>org.apache.royale.compiler.clients.COMPC</arguments>
+                      <argument>-load-config+=../compiler-externc/target/compile-as-config.xml</argument>
+                      <argument>-output=../compiler-externc/target/js.swc</argument>
+                  </arguments>
+              </configuration>
+          </execution>
+          <execution>
+              <id>generate-test-custom-swc</id>
+              <phase>test-compile</phase>
+              <goals>
+                  <goal>exec</goal>
+              </goals>
+              <configuration>
+                  <executable>java</executable>
+                  <arguments>
+                      <argument>-classpath</argument>
+                      <classpath />
+                      <arguments>org.apache.royale.compiler.clients.COMPC</arguments>
+                      <argument>-load-config+=target/compile-as-config.xml</argument>
+                      <argument>-output=target/custom.swc</argument>
+                  </arguments>
+              </configuration>
+          </execution>
+        </executions>
+      </plugin>
+
       <!--
             Do all the JBurg code generation.
-      -->

-      <plugin>

-        <groupId>net.sourceforge.jburg</groupId>

-        <artifactId>jburg-maven-plugin</artifactId>

-        <extensions>true</extensions>

-        <executions>

-          <execution>

-            <id>generate-css-emitter</id>

-            <goals>

-              <goal>generate</goal>

-            </goals>

-            <configuration>

-              <includes>

-                <include>CSSEmitter.jbg</include>

-              </includes>

-              <sourceDirectory>src/main/jburg/org/apache/royale/compiler/internal/css/codegen</sourceDirectory>

-              <outputDirectory>target/generated-sources/jburg/org/apache/royale/compiler/internal/css/codegen</outputDirectory>

-            </configuration>

-          </execution>

-          <execution>

-            <id>generate-cmc-emitter</id>

-            <goals>

-              <goal>generate</goal>

-            </goals>

-            <configuration>

-              <includes>

-                <include>CmcEmitter.jbg</include>

-              </includes>

-              <sourceDirectory>src/main/jburg/org/apache/royale/compiler/internal/as/codegen</sourceDirectory>

-              <outputDirectory>target/generated-sources/jburg/org/apache/royale/compiler/internal/as/codegen</outputDirectory>

-            </configuration>

-          </execution>

-        </executions>

-        <configuration>

-          <!-- debug=true generates the "dump" method for Emitters, which is used for debugging -->

-          <debug>true</debug>

-        </configuration>

-        <dependencies>

-          <!-- this needs to be first in order to patch jburg -->

-          <dependency>

-            <groupId>org.apache.royale.compiler</groupId>

-            <artifactId>compiler-jburg-types</artifactId>

-            <version>${compiler-jburg-types.version}</version>

-          </dependency>

-          <dependency>

-            <groupId>net.sourceforge.jburg</groupId>

-            <artifactId>jburg</artifactId>

-            <version>1.10.3</version>

-          </dependency>

-        </dependencies>

-      </plugin>

-

+      -->
+      <plugin>
+        <groupId>net.sourceforge.jburg</groupId>
+        <artifactId>jburg-maven-plugin</artifactId>
+        <extensions>true</extensions>
+        <executions>
+          <execution>
+            <id>generate-css-emitter</id>
+            <goals>
+              <goal>generate</goal>
+            </goals>
+            <configuration>
+              <includes>
+                <include>CSSEmitter.jbg</include>
+              </includes>
+              <sourceDirectory>src/main/jburg/org/apache/royale/compiler/internal/css/codegen</sourceDirectory>
+              <outputDirectory>target/generated-sources/jburg/org/apache/royale/compiler/internal/css/codegen</outputDirectory>
+            </configuration>
+          </execution>
+          <execution>
+            <id>generate-cmc-emitter</id>
+            <goals>
+              <goal>generate</goal>
+            </goals>
+            <configuration>
+              <includes>
+                <include>CmcEmitter.jbg</include>
+              </includes>
+              <sourceDirectory>src/main/jburg/org/apache/royale/compiler/internal/as/codegen</sourceDirectory>
+              <outputDirectory>target/generated-sources/jburg/org/apache/royale/compiler/internal/as/codegen</outputDirectory>
+            </configuration>
+          </execution>
+        </executions>
+        <configuration>
+          <!-- debug=true generates the "dump" method for Emitters, which is used for debugging -->
+          <debug>true</debug>
+        </configuration>
+        <dependencies>
+          <!-- this needs to be first in order to patch jburg -->
+          <dependency>
+            <groupId>org.apache.royale.compiler</groupId>
+            <artifactId>compiler-jburg-types</artifactId>
+            <version>${compiler-jburg-types.version}</version>
+          </dependency>
+          <dependency>
+            <groupId>net.sourceforge.jburg</groupId>
+            <artifactId>jburg</artifactId>
+            <version>1.10.3</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+
       <!--
             Do all the Antlr3 code generation.
-      -->

-      <plugin>

-        <groupId>org.antlr</groupId>

-        <artifactId>antlr3-maven-plugin</artifactId>

-        <executions>

-          <execution>

-            <id>generate-csslexer-and-cssparser</id>

-            <goals>

-              <goal>antlr</goal>

-            </goals>

-            <configuration>

-              <includes>

-                <include>CSS.g</include>

-              </includes>

-              <sourceDirectory>src/main/antlr3/org/apache/royale/compiler/internal/css</sourceDirectory>

-              <outputDirectory>target/generated-sources/antlr3/org/apache/royale/compiler/internal/css</outputDirectory>

-            </configuration>

-          </execution>

-          <execution>

-            <id>generate-csstree</id>

-            <goals>

-              <goal>antlr</goal>

-            </goals>

-            <configuration>

-              <includes>

-                <include>CSSTree.g</include>

-              </includes>

-              <sourceDirectory>src/main/antlr3/org/apache/royale/compiler/internal/css</sourceDirectory>

-              <outputDirectory>target/generated-sources/antlr3/org/apache/royale/compiler/internal/css</outputDirectory>

-            </configuration>

-          </execution>

-        </executions>

-      </plugin>

-

+      -->
+      <plugin>
+        <groupId>org.antlr</groupId>
+        <artifactId>antlr3-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>generate-csslexer-and-cssparser</id>
+            <goals>
+              <goal>antlr</goal>
+            </goals>
+            <configuration>
+              <includes>
+                <include>CSS.g</include>
+              </includes>
+              <sourceDirectory>src/main/antlr3/org/apache/royale/compiler/internal/css</sourceDirectory>
+              <outputDirectory>target/generated-sources/antlr3/org/apache/royale/compiler/internal/css</outputDirectory>
+            </configuration>
+          </execution>
+          <execution>
+            <id>generate-csstree</id>
+            <goals>
+              <goal>antlr</goal>
+            </goals>
+            <configuration>
+              <includes>
+                <include>CSSTree.g</include>
+              </includes>
+              <sourceDirectory>src/main/antlr3/org/apache/royale/compiler/internal/css</sourceDirectory>
+              <outputDirectory>target/generated-sources/antlr3/org/apache/royale/compiler/internal/css</outputDirectory>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+
       <!--
               Do all the custom processing with the royale build tools.
-      -->

-      <plugin>

-        <groupId>org.apache.royale.compiler</groupId>

-        <artifactId>compiler-build-tools</artifactId>

-        <executions>

-          <execution>

-            <id>generate-unknown-tree-handler</id>

-            <goals>

-              <goal>generate-unknown-tree-handler</goal>

-            </goals>

-            <configuration>

-              <inputFile>org/apache/royale/compiler/internal/as/codegen/UnknownTreeHandlerPatterns.xml</inputFile>

-              <outputFile>org/apache/royale/compiler/internal/as/codegen/UnknownTreeHandlerPatterns.java</outputFile>

-            </configuration>

-          </execution>

-          <execution>

-            <id>add-suppress-unused-warnings-annotations</id>

-            <goals>

-              <goal>add-class-annotation</goal>

-            </goals>

-            <configuration>

-              <includes>

-                <include>antlr/org/apache/royale/compiler/internal/parsing/as/ASParser.java</include>

-                <include>antlr/org/apache/royale/compiler/internal/parsing/as/ASTokenTypes.java</include>

-                <include>antlr/org/apache/royale/compiler/internal/parsing/as/MetadataTokenTypes.java</include>

-              </includes>

-              <annotation>@SuppressWarnings("unused")</annotation>

-            </configuration>

-          </execution>

-          <execution>

-            <id>add-suppress-all-warnings-annotations-css</id>

-            <goals>

-              <goal>add-class-annotation</goal>

-            </goals>

-            <configuration>

-              <includes>

-                <include>antlr3/org/apache/royale/compiler/internal/css/CSSLexer.java</include>

-                <include>antlr3/org/apache/royale/compiler/internal/css/CSSParser.java</include>

-              </includes>

-              <annotation>@SuppressWarnings("all")</annotation>

-              <dateStart>// $ANTLR 3.5.2 ***CSS.g</dateStart>

-            </configuration>

-          </execution>

-          <execution>

-            <id>add-suppress-all-warnings-annotations-csstree</id>

-            <goals>

-              <goal>add-class-annotation</goal>

-            </goals>

-            <configuration>

-              <includes>

-                <include>antlr3/org/apache/royale/compiler/internal/css/CSSTree.java</include>

-              </includes>

-              <annotation>@SuppressWarnings("all")</annotation>

-              <dateStart>// $ANTLR 3.5.2 ***CSSTree.g</dateStart>

-            </configuration>

-          </execution>

-          <execution>

-            <id>add-suppress-all-warnings-annotations-jburg</id>

-            <goals>

-              <goal>add-class-annotation</goal>

-            </goals>

-            <configuration>

-              <includes>

-                <include>antlr/org/apache/royale/compiler/internal/parsing/as/MetadataParser.java</include>

-              </includes>

-              <annotation>@SuppressWarnings("all")</annotation>

-            </configuration>

-          </execution>

-          <execution>

-            <id>add-suppress-rawtypes-unchecked-unused-warnings-annotations</id>

-            <goals>

-              <goal>add-class-annotation</goal>

-            </goals>

-            <configuration>

-              <includes>

-                <include>jburg/org/apache/royale/compiler/internal/css/codegen/CSSEmitter.java</include>

-                <include>jburg/org/apache/royale/compiler/internal/as/codegen/CmcEmitter.java</include>

-              </includes>

-              <annotation>@SuppressWarnings({"rawtypes", "unchecked", "unused"})</annotation>

-              <dateStart>/*  Generated</dateStart>

-              <dateEnd> by JBurg</dateEnd>

-            </configuration>

-          </execution>

-          <execution>

-            <id>generate-problems-enum</id>

-            <goals>

-              <goal>generate-problems-enum</goal>

-            </goals>

-          </execution>

-          <execution>

-            <id>generate-problems-resource-bundle</id>

-            <goals>

-              <goal>generate-problems-resource-bundle</goal>

-            </goals>

-          </execution>

-        </executions>

-      </plugin>

-

-      <!-- Make the surefire execute all unit-tests -->

-      <plugin>

-        <groupId>org.apache.maven.plugins</groupId>

-        <artifactId>maven-surefire-plugin</artifactId>

-        <configuration>

-          <includes>

-            <include>**/*Tests.java</include>

-          </includes>

-          <excludes>

-            <exclude>as/**/*Tests.java</exclude>

-            <exclude>f/**</exclude>

-            <exclude>mxml/tags/**</exclude>

-            <exclude>properties/**</exclude>

-            <exclude>**/MXMLComponentTagTests.java</exclude>

-            <exclude>**/MXMLComponentNodeTests.java</exclude>

-            <exclude>**/MXMLHTTPServiceTagTests.java</exclude>

-            <exclude>**/MXMLModelTagTests.java</exclude>

-            <exclude>**/MXMLRemoteObjectNodeTests.java</exclude>

-            <exclude>**/MXMLWebServiceNodeTests.java</exclude>

-            <exclude>**/MXMLDesignLayerNodeTests.java</exclude>

-            <exclude>**/MXMLHTTPServiceNodeTests.java</exclude>

-            <exclude>**/MXMLModelNodeTests.java</exclude>

-            <exclude>**/MXMLRemoteObjectTagTests.java</exclude>

-            <exclude>**/MXMLStateNodeTests.java</exclude>

-            <exclude>**/MXMLVectorNodeTests.java</exclude>

-            <exclude>**/MXMLWebServiceTagTests.java</exclude>

-          </excludes>

-        </configuration>

-      </plugin>

-

-      <plugin>

-        <groupId>org.apache.maven.plugins</groupId>

-        <artifactId>maven-failsafe-plugin</artifactId>

-        <configuration>

-          <includes>

-            <include>as/**/*Tests.java</include>

-          </includes>

-          <excludes>

-            <exclude>f/**</exclude>

-            <exclude>mxml/tags/**</exclude>

-            <exclude>properties/**</exclude>

-            <exclude>**/MXMLComponentTagTests.java</exclude>

-            <exclude>**/MXMLComponentNodeTests.java</exclude>

-            <exclude>**/MXMLHTTPServiceTagTests.java</exclude>

-            <exclude>**/MXMLModelTagTests.java</exclude>

-            <exclude>**/MXMLRemoteObjectNodeTests.java</exclude>

-            <exclude>**/MXMLWebServiceNodeTests.java</exclude>

-            <exclude>**/MXMLDesignLayerNodeTests.java</exclude>

-            <exclude>**/MXMLHTTPServiceNodeTests.java</exclude>

-            <exclude>**/MXMLModelNodeTests.java</exclude>

-            <exclude>**/MXMLRemoteObjectTagTests.java</exclude>

-            <exclude>**/MXMLStateNodeTests.java</exclude>

-            <exclude>**/MXMLVectorNodeTests.java</exclude>

-            <exclude>**/MXMLWebServiceTagTests.java</exclude>

-          </excludes>

-        </configuration>

-      </plugin>

-    </plugins>

-  </build>

-

-  <profiles>

+      -->
+      <plugin>
+        <groupId>org.apache.royale.compiler</groupId>
+        <artifactId>compiler-build-tools</artifactId>
+        <executions>
+          <execution>
+            <id>generate-unknown-tree-handler</id>
+            <goals>
+              <goal>generate-unknown-tree-handler</goal>
+            </goals>
+            <configuration>
+              <inputFile>org/apache/royale/compiler/internal/as/codegen/UnknownTreeHandlerPatterns.xml</inputFile>
+              <outputFile>org/apache/royale/compiler/internal/as/codegen/UnknownTreeHandlerPatterns.java</outputFile>
+            </configuration>
+          </execution>
+          <execution>
+            <id>add-suppress-unused-warnings-annotations</id>
+            <goals>
+              <goal>add-class-annotation</goal>
+            </goals>
+            <configuration>
+              <includes>
+                <include>antlr/org/apache/royale/compiler/internal/parsing/as/ASParser.java</include>
+                <include>antlr/org/apache/royale/compiler/internal/parsing/as/ASTokenTypes.java</include>
+                <include>antlr/org/apache/royale/compiler/internal/parsing/as/MetadataTokenTypes.java</include>
+              </includes>
+              <annotation>@SuppressWarnings("unused")</annotation>
+            </configuration>
+          </execution>
+          <execution>
+            <id>add-suppress-all-warnings-annotations-css</id>
+            <goals>
+              <goal>add-class-annotation</goal>
+            </goals>
+            <configuration>
+              <includes>
+                <include>antlr3/org/apache/royale/compiler/internal/css/CSSLexer.java</include>
+                <include>antlr3/org/apache/royale/compiler/internal/css/CSSParser.java</include>
+              </includes>
+              <annotation>@SuppressWarnings("all")</annotation>
+              <dateStart>// $ANTLR 3.5.2 ***CSS.g</dateStart>
+            </configuration>
+          </execution>
+          <execution>
+            <id>add-suppress-all-warnings-annotations-csstree</id>
+            <goals>
+              <goal>add-class-annotation</goal>
+            </goals>
+            <configuration>
+              <includes>
+                <include>antlr3/org/apache/royale/compiler/internal/css/CSSTree.java</include>
+              </includes>
+              <annotation>@SuppressWarnings("all")</annotation>
+              <dateStart>// $ANTLR 3.5.2 ***CSSTree.g</dateStart>
+            </configuration>
+          </execution>
+          <execution>
+            <id>add-suppress-all-warnings-annotations-jburg</id>
+            <goals>
+              <goal>add-class-annotation</goal>
+            </goals>
+            <configuration>
+              <includes>
+                <include>antlr/org/apache/royale/compiler/internal/parsing/as/MetadataParser.java</include>
+              </includes>
+              <annotation>@SuppressWarnings("all")</annotation>
+            </configuration>
+          </execution>
+          <execution>
+            <id>add-suppress-rawtypes-unchecked-unused-warnings-annotations</id>
+            <goals>
+              <goal>add-class-annotation</goal>
+            </goals>
+            <configuration>
+              <includes>
+                <include>jburg/org/apache/royale/compiler/internal/css/codegen/CSSEmitter.java</include>
+                <include>jburg/org/apache/royale/compiler/internal/as/codegen/CmcEmitter.java</include>
+              </includes>
+              <annotation>@SuppressWarnings({"rawtypes", "unchecked", "unused"})</annotation>
+              <dateStart>/*  Generated</dateStart>
+              <dateEnd> by JBurg</dateEnd>
+            </configuration>
+          </execution>
+          <execution>
+            <id>generate-problems-enum</id>
+            <goals>
+              <goal>generate-problems-enum</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>generate-problems-resource-bundle</id>
+            <goals>
+              <goal>generate-problems-resource-bundle</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>order-jflex-switch-statements</id>
+            <goals>
+              <goal>order-jflex-switches</goal>
+            </goals>
+            <configuration>
+              <includes>
+              <include>jflex/org/apache/royale/compiler/internal/parsing/as/RawASDocTokenizer.java</include>
+              <include>jflex/org/apache/royale/compiler/internal/parsing/as/RawASTokenizer.java</include>
+              <include>jflex/org/apache/royale/compiler/internal/parsing/mxml/RawMXMLTokenizer.java</include>
+              </includes>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+
+      <!-- Make the surefire execute all unit-tests -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <includes>
+            <include>**/*Tests.java</include>
+          </includes>
+          <excludes>
+            <exclude>as/**/*Tests.java</exclude>
+            <exclude>f/**</exclude>
+            <exclude>mxml/tags/**</exclude>
+            <exclude>properties/**</exclude>
+            <exclude>**/MXMLComponentTagTests.java</exclude>
+            <exclude>**/MXMLComponentNodeTests.java</exclude>
+            <exclude>**/MXMLHTTPServiceTagTests.java</exclude>
+            <exclude>**/MXMLModelTagTests.java</exclude>
+            <exclude>**/MXMLRemoteObjectNodeTests.java</exclude>
+            <exclude>**/MXMLWebServiceNodeTests.java</exclude>
+            <exclude>**/MXMLDesignLayerNodeTests.java</exclude>
+            <exclude>**/MXMLHTTPServiceNodeTests.java</exclude>
+            <exclude>**/MXMLModelNodeTests.java</exclude>
+            <exclude>**/MXMLRemoteObjectTagTests.java</exclude>
+            <exclude>**/MXMLStateNodeTests.java</exclude>
+            <exclude>**/MXMLVectorNodeTests.java</exclude>
+            <exclude>**/MXMLWebServiceTagTests.java</exclude>
+          </excludes>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-failsafe-plugin</artifactId>
+        <configuration>
+          <includes>
+            <include>as/**/*Tests.java</include>
+          </includes>
+          <excludes>
+            <exclude>f/**</exclude>
+            <exclude>mxml/tags/**</exclude>
+            <exclude>properties/**</exclude>
+            <exclude>**/MXMLComponentTagTests.java</exclude>
+            <exclude>**/MXMLComponentNodeTests.java</exclude>
+            <exclude>**/MXMLHTTPServiceTagTests.java</exclude>
+            <exclude>**/MXMLModelTagTests.java</exclude>
+            <exclude>**/MXMLRemoteObjectNodeTests.java</exclude>
+            <exclude>**/MXMLWebServiceNodeTests.java</exclude>
+            <exclude>**/MXMLDesignLayerNodeTests.java</exclude>
+            <exclude>**/MXMLHTTPServiceNodeTests.java</exclude>
+            <exclude>**/MXMLModelNodeTests.java</exclude>
+            <exclude>**/MXMLRemoteObjectTagTests.java</exclude>
+            <exclude>**/MXMLStateNodeTests.java</exclude>
+            <exclude>**/MXMLVectorNodeTests.java</exclude>
+            <exclude>**/MXMLWebServiceTagTests.java</exclude>
+          </excludes>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <profiles>
     <!--
         This profile adds one test, that relies on the original FDK being
         available as it compiles each project in the framework/projects
         directory. It requires some environment variables being set.
-    -->

-    <profile>

-      <id>option-with-flex-sdk-tests</id>

-      <build>

-        <plugins>

-          <plugin>

-            <groupId>org.apache.maven.plugins</groupId>

-            <artifactId>maven-failsafe-plugin</artifactId>

-            <configuration>

-              <includes combine.children="append">

-                <include>f/**/*Tests.java</include>

-                <include>mxml/**/*Tests.java</include>

-                <include>properties/**/*Tests.java</include>

-                <include>**/MXMLComponentTagTests.java</include>

-                <include>**/MXMLComponentNodeTests.java</include>

-                <include>**/MXMLHTTPServiceTagTests.java</include>

-                <include>**/MXMLModelTagTests.java</include>

-                <include>**/MXMLRemoteObjectNodeTests.java</include>

-                <include>**/MXMLWebServiceNodeTests.java</include>

-                <include>**/MXMLDesignLayerNodeTests.java</include>

-                <include>**/MXMLHTTPServiceNodeTests.java</include>

-                <include>**/MXMLModelNodeTests.java</include>

-                <include>**/MXMLRemoteObjectTagTests.java</include>

-                <include>**/MXMLStateNodeTests.java</include>

-                <include>**/MXMLVectorNodeTests.java</include>

-                <include>**/MXMLWebServiceTagTests.java</include>

-              </includes>

-            </configuration>

-          </plugin>

-        </plugins>

-      </build>

-    </profile>

-

-    <!-- Also run tests using the FLASHPLAYER_DEBUGGER -->

-    <profile>

-      <id>option-with-swf</id>

-      <dependencies>

-        <!-- Ensure the playerglobal is available for running tests -->

-        <dependency>

-          <groupId>com.adobe.flash.framework</groupId>

-          <artifactId>playerglobal</artifactId>

-          <version>${flash.version}</version>

-          <type>swc</type>

-          <scope>runtime</scope>

-        </dependency>

-      </dependencies>

-    </profile>

-  </profiles>

-

-  <dependencies>

-    <dependency>

-      <groupId>org.apache.royale.compiler</groupId>

-      <artifactId>compiler-jburg-types</artifactId>

-      <version>${compiler-jburg-types.version}</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.royale.compiler</groupId>

-      <artifactId>compiler-common</artifactId>

-      <version>0.9.7</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.flex</groupId>

-      <artifactId>flex-tool-api</artifactId>

-      <version>1.0.0</version>

-    </dependency>

-    <dependency>

-      <groupId>commons-io</groupId>

-      <artifactId>commons-io</artifactId>

-      <version>2.4</version>

-    </dependency>

-    <dependency>

-      <groupId>commons-cli</groupId>

-      <artifactId>commons-cli</artifactId>

-      <version>1.2</version>

-    </dependency>

-    <dependency>

-      <groupId>org.antlr</groupId>

-      <artifactId>antlr</artifactId>

-      <version>3.3</version>

-    </dependency>

-    <dependency>

-      <groupId>com.google.guava</groupId>

-      <artifactId>guava</artifactId>

-      <version>25.1-jre</version>

-    </dependency>

-    <dependency>

-      <groupId>net.sourceforge.jburg</groupId>

-      <artifactId>jburg</artifactId>

-      <version>1.10.3</version>

-    </dependency>

-    <dependency>

-      <groupId>de.jflex</groupId>

-      <artifactId>jflex</artifactId>

-      <version>1.6.0</version>

-      <exclusions>

-        <exclusion>

-          <groupId>org.apache.ant</groupId>

-          <artifactId>ant</artifactId>

-        </exclusion>

-      </exclusions>

-    </dependency>

-    <dependency>

-      <groupId>org.b1.pack</groupId>

-      <artifactId>lzma-sdk-4j</artifactId>

-      <version>9.22.0</version>

-    </dependency>

-

-    <dependency>

-      <groupId>org.apache.royale.compiler</groupId>

-      <artifactId>compiler-test-utils</artifactId>

-      <version>0.9.7</version>

-      <scope>test</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.royale.compiler</groupId>

-      <artifactId>compiler-externc</artifactId>

-      <version>0.9.7</version>

-    </dependency>

-    <dependency>

-      <groupId>junit</groupId>

-      <artifactId>junit</artifactId>

-      <version>4.10</version>

-      <scope>test</scope>

-    </dependency>

-    <!-- TODO: Currently only needed for the duplicate FlashplayerSecurityHandler -->

-    <dependency>

-      <groupId>org.apache.commons</groupId>

-      <artifactId>commons-lang3</artifactId>

-      <version>3.4</version>

-      <scope>test</scope>

-    </dependency>

-  </dependencies>

-

-<properties><project.build.outputTimestamp>2020-05-07T15:02:12Z</project.build.outputTimestamp></properties></project>

+    -->
+    <profile>
+      <id>option-with-flex-sdk-tests</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-failsafe-plugin</artifactId>
+            <configuration>
+              <includes combine.children="append">
+                <include>f/**/*Tests.java</include>
+                <include>mxml/**/*Tests.java</include>
+                <include>properties/**/*Tests.java</include>
+                <include>**/MXMLComponentTagTests.java</include>
+                <include>**/MXMLComponentNodeTests.java</include>
+                <include>**/MXMLHTTPServiceTagTests.java</include>
+                <include>**/MXMLModelTagTests.java</include>
+                <include>**/MXMLRemoteObjectNodeTests.java</include>
+                <include>**/MXMLWebServiceNodeTests.java</include>
+                <include>**/MXMLDesignLayerNodeTests.java</include>
+                <include>**/MXMLHTTPServiceNodeTests.java</include>
+                <include>**/MXMLModelNodeTests.java</include>
+                <include>**/MXMLRemoteObjectTagTests.java</include>
+                <include>**/MXMLStateNodeTests.java</include>
+                <include>**/MXMLVectorNodeTests.java</include>
+                <include>**/MXMLWebServiceTagTests.java</include>
+              </includes>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+
+    <!-- Also run tests using the FLASHPLAYER_DEBUGGER -->
+    <profile>
+      <id>option-with-swf</id>
+      <dependencies>
+        <!-- Ensure the playerglobal is available for running tests -->
+        <dependency>
+          <groupId>com.adobe.flash.framework</groupId>
+          <artifactId>playerglobal</artifactId>
+          <version>${flash.version}</version>
+          <type>swc</type>
+          <scope>runtime</scope>
+        </dependency>
+      </dependencies>
+    </profile>
+  </profiles>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.royale.compiler</groupId>
+      <artifactId>compiler-jburg-types</artifactId>
+      <version>${compiler-jburg-types.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.compiler</groupId>
+      <artifactId>compiler-common</artifactId>
+      <version>0.9.8</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.flex</groupId>
+      <artifactId>flex-tool-api</artifactId>
+      <version>1.0.0</version>
+    </dependency>
+    <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
+      <version>2.4</version>
+    </dependency>
+    <dependency>
+      <groupId>commons-cli</groupId>
+      <artifactId>commons-cli</artifactId>
+      <version>1.2</version>
+    </dependency>
+    <dependency>
+      <groupId>org.antlr</groupId>
+      <artifactId>antlr</artifactId>
+      <version>3.3</version>
+    </dependency>
+    <dependency>
+      <groupId>com.google.guava</groupId>
+      <artifactId>guava</artifactId>
+      <version>25.1-jre</version>
+    </dependency>
+    <dependency>
+      <groupId>net.sourceforge.jburg</groupId>
+      <artifactId>jburg</artifactId>
+      <version>1.10.3</version>
+    </dependency>
+    <dependency>
+      <groupId>de.jflex</groupId>
+      <artifactId>jflex</artifactId>
+      <version>1.6.0</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.apache.ant</groupId>
+          <artifactId>ant</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.b1.pack</groupId>
+      <artifactId>lzma-sdk-4j</artifactId>
+      <version>9.22.0</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.royale.compiler</groupId>
+      <artifactId>compiler-test-utils</artifactId>
+      <version>0.9.8</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.compiler</groupId>
+      <artifactId>compiler-externc</artifactId>
+      <version>0.9.8</version>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.10</version>
+      <scope>test</scope>
+    </dependency>
+    <!-- TODO: Currently only needed for the duplicate FlashplayerSecurityHandler -->
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-lang3</artifactId>
+      <version>3.4</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+<properties /></project>
diff --git a/compiler/src/main/antlr/org/apache/royale/compiler/internal/parsing/as/ImportMetadataTokenTypes.txt b/compiler/src/main/antlr/org/apache/royale/compiler/internal/parsing/as/ImportMetadataTokenTypes.txt
index 478e80d..bf99d0d 100644
--- a/compiler/src/main/antlr/org/apache/royale/compiler/internal/parsing/as/ImportMetadataTokenTypes.txt
+++ b/compiler/src/main/antlr/org/apache/royale/compiler/internal/parsing/as/ImportMetadataTokenTypes.txt
@@ -65,4 +65,5 @@
 TOKEN_SKIN_STATES_KEYWORD=54
 TOKEN_ASDOC_COMMENT = 55
 TOKEN_HOST_COMPONENT_KEYWORD = 56
-TOKEN_RESOURCEBUNDLE_KEYWORD = 59
\ No newline at end of file
+TOKEN_RESOURCEBUNDLE_KEYWORD = 59
+TOKEN_ATTR_OPERATOR_NS_QUALIFIER = 62
\ No newline at end of file
diff --git a/compiler/src/main/antlr3/org/apache/royale/compiler/internal/css/CSS.g b/compiler/src/main/antlr3/org/apache/royale/compiler/internal/css/CSS.g
index 49c9d3d..37b631a 100644
--- a/compiler/src/main/antlr3/org/apache/royale/compiler/internal/css/CSS.g
+++ b/compiler/src/main/antlr3/org/apache/royale/compiler/internal/css/CSS.g
@@ -140,28 +140,32 @@
 
     // Check if there's white space between the previous token and the next token.
     final CommonToken lastToken = (CommonToken) getTokenStream().LT(-1);
-    final int lastType = lastToken.getType();
-    if (lastType == CHILD) 
-    { 
-        return 1;
-    }
-    if (lastType == PRECEDED)
+    if (lastToken != null)
     {
-        return 2;
-    }
-    if (lastType == TILDE)
-    {
-        return 3;
-    }
-    if (lastToken != null && nextToken != null)
-    {
-        final int lastStop = lastToken.getStopIndex();
-        final int nextStart = nextToken.getStartIndex();
-        if (lastStop + 1 < nextStart)
+        final int lastType = lastToken.getType();
+        if (lastType == CHILD)
         {
-            return 0;
+            return 1;
+        }
+        if (lastType == PRECEDED)
+        {
+            return 2;
+        }
+        if (lastType == TILDE)
+        {
+            return 3;
+        }
+        if (nextToken != null)
+        {
+            final int lastStop = lastToken.getStopIndex();
+            final int nextStart = nextToken.getStartIndex();
+            if (lastStop + 1 < nextStart)
+            {
+                return 0;
+            }
         }
     }
+
     
     // If the next token is "{" or ",", it's also end of a selector.
     if (nextType == BLOCK_OPEN || nextType == COMMA)
@@ -649,7 +653,7 @@
     :   '#' ( LETTER | DIGIT | '-' | '_' )+
     ;
 
-ID  :   ( '-' | '_'  )? LETTER ( LETTER | DIGIT | '-' | '_'  )*
+ID  :   ( '-' | '_' | '__' | '___' )? LETTER ( LETTER | DIGIT | '-' | '_'  )*
     ;
     
 /**
diff --git a/compiler/src/main/java/org/apache/royale/compiler/constants/IMetaAttributeConstants.java b/compiler/src/main/java/org/apache/royale/compiler/constants/IMetaAttributeConstants.java
index ecf8158..9412bcb 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/constants/IMetaAttributeConstants.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/constants/IMetaAttributeConstants.java
@@ -219,6 +219,9 @@
     
     // [RoyaleArrayLike(...args)]
     static final String ATTRIBUTE_ARRAYLIKE = "RoyaleArrayLike";
+
+    // [RoyaleBindings] (added by compiler)
+    static final String ATTRIBUTE_BINDINGS= "RoyaleBindings";
 	
 	/**
 	 * List of metadata tags that do not inherit
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/as/codegen/ABCGenerator.java b/compiler/src/main/java/org/apache/royale/compiler/internal/as/codegen/ABCGenerator.java
index 7e93f95..14c75c1 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/as/codegen/ABCGenerator.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/as/codegen/ABCGenerator.java
@@ -39,6 +39,7 @@
 import org.apache.royale.abc.semantics.MethodBodyInfo;
 import org.apache.royale.abc.semantics.MethodInfo;
 import org.apache.royale.abc.semantics.Name;
+import org.apache.royale.abc.semantics.Namespace;
 import org.apache.royale.abc.semantics.PooledValue;
 import org.apache.royale.abc.visitors.IMethodBodyVisitor;
 import org.apache.royale.abc.visitors.IMethodVisitor;
@@ -261,6 +262,9 @@
         MethodInfo mi = createMethodInfo(enclosing_scope, func, alternate_name);
         if (mi.isNative())
         {
+            // previous versions didn't add the default argument values to
+            // native methods, but that led to broken signatures -JT
+            mi = createMethodInfoWithOptionalDefaultArgumentValues(enclosing_scope, func, true, alternate_name);
             generateNativeMethod(func, mi, enclosing_scope);
         }
         else
@@ -293,6 +297,9 @@
         MethodInfo mi = createMethodInfo(enclosing_scope, func, null);
         if (mi.isNative())
         {
+            // previous versions didn't add the default argument values to
+            // native methods, but that led to broken signatures -JT
+            mi = createMethodInfoWithOptionalDefaultArgumentValues(enclosing_scope, func, true, null);
             generateNativeMethod(func, mi, enclosing_scope);
             return new GenerateFunctionInParallelResult(Futures.immediateFuture(null), mi, Collections.<IVisitor>emptyList());
         }
@@ -325,7 +332,17 @@
         // but for native types, as the burm isn't run, we need to set
         // the return type here.
         String returnType = func.getReturnType();
-        mi.setReturnType(new Name(returnType));
+        int lastDotIndex = returnType.lastIndexOf('.');
+        if (lastDotIndex != -1)
+        {
+            Namespace ns = new Namespace(CONSTANT_PackageNs, returnType.substring(0, lastDotIndex));
+            String baseName = returnType.substring(lastDotIndex + 1);
+            mi.setReturnType(new Name(ns, baseName));
+        }
+        else
+        {
+            mi.setReturnType(new Name(returnType));
+        }
         
         mv.visitEnd();
     }
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/as/codegen/ClassDirectiveProcessor.java b/compiler/src/main/java/org/apache/royale/compiler/internal/as/codegen/ClassDirectiveProcessor.java
index 2f45c11..281a973 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/as/codegen/ClassDirectiveProcessor.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/as/codegen/ClassDirectiveProcessor.java
@@ -1006,6 +1006,13 @@
                     for (int i=0;i< others.getSize(); i++) {
                         IDefinition other = others.getDefinition(i);
                         if (other == func) continue;
+                        //ignore code-gen Bindable setters if we are checking against the original setter
+                        if ((func instanceof SyntheticBindableSetterDefinition && other instanceof ISetterDefinition)
+                                || (other instanceof SyntheticBindableSetterDefinition && func instanceof ISetterDefinition)
+                                && (func.getNode().equals(other.getNode()))
+                            ) {
+                            continue;
+                        }
                         if (other.getNamespaceReference().isLanguageNamespace()) {
                             if (!SemanticUtils.isGetterSetterPair(func, other, classScope.getProject())) {
                                 boolean issueProblem = true;
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/codegen/databinding/BindingDatabase.java b/compiler/src/main/java/org/apache/royale/compiler/internal/codegen/databinding/BindingDatabase.java
index d1df60c..d7a087a 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/codegen/databinding/BindingDatabase.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/codegen/databinding/BindingDatabase.java
@@ -27,9 +27,7 @@
 import java.util.Map.Entry;
 import java.util.Set;
 import java.util.TreeSet;
-import java.util.WeakHashMap;
 
-import org.apache.royale.compiler.definitions.IClassDefinition;
 import org.apache.royale.compiler.internal.as.codegen.MXMLClassDirectiveProcessor;
 import org.apache.royale.compiler.internal.codegen.databinding.WatcherInfoBase.WatcherType;
 import org.apache.royale.compiler.internal.scopes.ASScope;
@@ -65,6 +63,20 @@
             _diagnosticLogger.add(this);
         }
     }
+
+    private String nearestAncestorBindings = null;
+
+    public Boolean getHasAncestorBindings(){
+        return nearestAncestorBindings != null;
+    }
+
+    public void setNearestAncestorWithBindings(String value){
+        nearestAncestorBindings = value;
+    }
+
+    public String getNearestAncestorWithBindings(){
+        return nearestAncestorBindings;
+    }
     
     /************** private data ****************/
      
@@ -337,6 +349,10 @@
     public String toString()
     {
         StringBuilder sb = new StringBuilder();
+
+        if (nearestAncestorBindings != null) {
+            sb.append("<ancestor bindings also exist at "+ nearestAncestorBindings+ " >");
+        }
         
         if (bindingInfoSet.isEmpty())
         {
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/codegen/databinding/BindingInfo.java b/compiler/src/main/java/org/apache/royale/compiler/internal/codegen/databinding/BindingInfo.java
index 30c3c8d..fc907de 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/codegen/databinding/BindingInfo.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/codegen/databinding/BindingInfo.java
@@ -48,6 +48,7 @@
 import org.apache.royale.compiler.tree.as.IFunctionCallNode;
 import org.apache.royale.compiler.tree.as.IIdentifierNode;
 import org.apache.royale.compiler.tree.as.IMemberAccessExpressionNode;
+import org.apache.royale.compiler.tree.mxml.IMXMLArrayNode;
 import org.apache.royale.compiler.tree.mxml.IMXMLBindingAttributeNode;
 import org.apache.royale.compiler.tree.mxml.IMXMLBindingNode;
 import org.apache.royale.compiler.tree.mxml.IMXMLClassDefinitionNode;
@@ -302,7 +303,36 @@
             // We are an MXML primitive (like sf:String), so the dest string is just our ID
             String id = ((IMXMLExpressionNode)parent).getEffectiveID();
             assert id != null;
-            destString = id;
+
+            IMXMLClassReferenceNode propertyParent = (IMXMLClassReferenceNode)
+                    parent.getAncestorOfType(IMXMLClassReferenceNode.class);  
+            assert propertyParent != null;
+            if (propertyParent instanceof IMXMLClassDefinitionNode)
+            {
+                destString = "this." + id;
+            }
+            else
+            {
+                destString = id;
+            }
+        }
+        else if (parent instanceof IMXMLArrayNode)
+        {
+            // We are an MXML primitive, so the dest string is just our ID
+            String id = ((IMXMLArrayNode)parent).getEffectiveID();
+            assert id != null;
+
+            IMXMLClassReferenceNode propertyParent = (IMXMLClassReferenceNode)
+                    parent.getAncestorOfType(IMXMLClassReferenceNode.class);  
+            assert propertyParent != null;
+            if (propertyParent instanceof IMXMLClassDefinitionNode)
+            {
+                destString = "this." + id;
+            }
+            else
+            {
+                destString = id;
+            }
         }
         else if (parent instanceof IMXMLModelPropertyNode)
         {
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/codegen/databinding/MXMLBindingDirectiveHelper.java b/compiler/src/main/java/org/apache/royale/compiler/internal/codegen/databinding/MXMLBindingDirectiveHelper.java
index a5a2fe6..ea82e09 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/codegen/databinding/MXMLBindingDirectiveHelper.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/codegen/databinding/MXMLBindingDirectiveHelper.java
@@ -33,6 +33,8 @@
 import org.apache.royale.abc.visitors.IABCVisitor;
 import org.apache.royale.compiler.common.DependencyType;
 import org.apache.royale.compiler.constants.IASLanguageConstants;
+import org.apache.royale.compiler.constants.IMetaAttributeConstants;
+import org.apache.royale.compiler.definitions.IClassDefinition;
 import org.apache.royale.compiler.definitions.IDefinition;
 import org.apache.royale.compiler.definitions.references.IResolvedQualifiersReference;
 import org.apache.royale.compiler.definitions.references.ReferenceFactory;
@@ -63,9 +65,10 @@
  * TODO: 
  *      Document the runtime dependencies on SDK
  *      add problem reporting.
- *      
+ *
+ *      bind to function, This should be fixed now
  * Cases not yet working:
- *      bind to function, xml, xml list, array
+ *      xml, xml list, array
  *      
  * Improve code gen
  *      don't make getter functions when not needed
@@ -145,6 +148,15 @@
                 return null;
        
         bindingDataBase.finishAnalysis();
+
+        for (IClassDefinition ancestor: host.getClassDefinition().resolveAncestry(host.getProject())) {
+            if (ancestor.equals(host.getClassDefinition())) continue;
+            if (ancestor.getMetaTagByName(IMetaAttributeConstants.ATTRIBUTE_BINDINGS) != null) {
+                //System.out.println("Ancestor bindings for "+host.getClassDefinition().getQualifiedName()+" at "+ancestor.getQualifiedName());
+                bindingDataBase.setNearestAncestorWithBindings(ancestor.getQualifiedName());
+                break;
+            }
+        }
         
         // Please leave this in here - it is a very commonly used diagnostic
         // Just comment it out before checking
@@ -159,8 +171,15 @@
                 makeSpecialMemberVariablesForBinding();
                 isFlexSDK = true;
             }
-            else
-                host.addVariableTrait(IMXMLTypeConstants.NAME_BINDINGS, NAME_ARRAYTYPE);
+            else {
+                //if the variable is already declared on an ancestor, we should not redeclare it (as it is currently public)
+                //redeclaring it will essentially prevent the inherited value from being accessed at the current level (in swf)
+                //accessing the super class value allows 'nesting' which permits inheritance
+                if (!bindingDataBase.getHasAncestorBindings())
+                    host.addVariableTrait(IMXMLTypeConstants.NAME_BINDINGS, NAME_ARRAYTYPE);
+                //this should already be set, the following may be able to be removed (tbc):
+                host.getClassDefinition().setRoyaleBindings();
+            }
         }
         else
         {
@@ -169,8 +188,14 @@
                 makeSpecialMemberVariablesForBinding();
                 isFlexSDK = true;
             }
-            else
-                host.addVariableTrait(IMXMLTypeConstants.NAME_BINDINGS, NAME_ARRAYTYPE);
+            else{
+                //redeclaring it will essentially prevent the inherited value from being accessed at the current level (in swf)
+                if (!bindingDataBase.getHasAncestorBindings())
+                    host.addVariableTrait(IMXMLTypeConstants.NAME_BINDINGS, NAME_ARRAYTYPE);
+                //this should already be set, the following may be able to be removed (tbc):
+                host.getClassDefinition().setRoyaleBindings();
+
+            }
         }
         
         if (host.getProject().getTargetSettings().getMxmlChildrenAsData())
@@ -191,11 +216,20 @@
     
     private InstructionList outputBindingInfoAsData(boolean isFlexSDK)
     {
-        //System.out.println("outputBindingInfoAsData");
 
         InstructionList ret = new InstructionList();
         int propertyCount = 0;
-        
+        if (!isFlexSDK && bindingDataBase.getHasAncestorBindings()) {
+            //add the ancestor bindings reference as the first item in this current _bindings array
+            //this approach permits binding evaluation to work recursively by checking the first element only
+
+            ret.addInstruction(OP_getlocal0);
+            // stack: ..., this
+            ret.addInstruction(OP_getproperty, IMXMLTypeConstants.NAME_BINDINGS);
+            //propertyCount needs to be incremented for the current array:
+            propertyCount++;
+        }
+
         Set<BindingInfo> bindingInfo = bindingDataBase.getBindingInfo();
         ret.pushNumericConstant(bindingInfo.size()); // number of bindings
         propertyCount++;
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/codegen/databinding/WatcherAnalyzer.java b/compiler/src/main/java/org/apache/royale/compiler/internal/codegen/databinding/WatcherAnalyzer.java
index 7f9289e..50ade92 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/codegen/databinding/WatcherAnalyzer.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/codegen/databinding/WatcherAnalyzer.java
@@ -24,6 +24,7 @@
 import java.util.List;
 
 import org.apache.royale.compiler.constants.IASKeywordConstants;
+import org.apache.royale.compiler.constants.IASLanguageConstants;
 import org.apache.royale.compiler.definitions.IClassDefinition;
 import org.apache.royale.compiler.definitions.IConstantDefinition;
 import org.apache.royale.compiler.definitions.IDefinition;
@@ -34,6 +35,8 @@
 import org.apache.royale.compiler.internal.codegen.databinding.WatcherInfoBase.WatcherType;
 import org.apache.royale.compiler.internal.projects.RoyaleProject;
 import org.apache.royale.compiler.internal.tree.as.FunctionCallNode;
+import org.apache.royale.compiler.internal.tree.as.IdentifierNode;
+import org.apache.royale.compiler.internal.tree.as.MemberAccessExpressionNode;
 import org.apache.royale.compiler.problems.ICompilerProblem;
 import org.apache.royale.compiler.problems.MXMLDatabindingSourceNotBindableProblem;
 import org.apache.royale.compiler.projects.ICompilerProject;
@@ -271,6 +274,52 @@
         }
     }
 
+    private boolean isLeftXML(MemberAccessExpressionNode maen)
+    {
+        IDefinition xmlDef = project.getBuiltinType(IASLanguageConstants.BuiltinType.XML);
+		if (maen.getLeftOperandNode().getNodeID() == ASTNodeID.Op_AsID)
+		{
+			if (maen.getLeftOperandNode().getChild(1).getNodeID() == ASTNodeID.IdentifierID)
+			{
+				IdentifierNode child = (IdentifierNode)maen.getLeftOperandNode().getChild(1);
+				IDefinition def = child.resolve(project);
+	    		if (def == xmlDef)
+	    			return true;
+				ITypeDefinition type = child.resolveType(project);
+	    		if (type != null && type.isInstanceOf("XML", project))
+	    			return true;    				
+			}
+		} 
+		else if (maen.getLeftOperandNode().getNodeID() == ASTNodeID.MemberAccessExpressionID)
+		{
+			maen = (MemberAccessExpressionNode)maen.getLeftOperandNode();
+			if (isLeftXML(maen))
+				return true;
+		}
+    	return false;
+    }
+    
+    private boolean nodeIsXML(IASNode node)
+    {
+        IDefinition xmlDef = project.getBuiltinType(IASLanguageConstants.BuiltinType.XML);
+    	IASNode parent = node.getParent();
+    	while (parent != null && (parent.getNodeID() == ASTNodeID.MemberAccessExpressionID))
+    	{
+    		MemberAccessExpressionNode maen = ((MemberAccessExpressionNode)parent);
+    		IDefinition def = maen.resolve(project);
+    		if (def == xmlDef)
+    			return true;
+    		ITypeDefinition type = maen.resolveType(project);
+    		if (type != null && type.isInstanceOf("XML", project))
+    			return true;
+    		if (def != null)
+    			break;
+			if (isLeftXML(maen))
+				return true;
+    		parent = parent.getParent();
+    	}
+    	return false;
+    }
     
     private void analyzeIdentifierNode(IIdentifierNode node, AnalysisState state)
     {
@@ -288,6 +337,8 @@
                         // may very well be a dynamic property with no definition,
                         // so will will continue on (with the knowledge that we have no
                         // IDefinition
+            if (nodeIsXML(node))
+            	return;
             this.problems.add(new MXMLDatabindingSourceNotBindableProblem(node, node.getName()));
             return;
         }
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/css/CSSStringPropertyValue.java b/compiler/src/main/java/org/apache/royale/compiler/internal/css/CSSStringPropertyValue.java
index 22dd35b..c5c5a57 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/css/CSSStringPropertyValue.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/css/CSSStringPropertyValue.java
@@ -81,7 +81,8 @@
     {
         int idx = 0;
         int c = value.indexOf('\\');
-        while (c != -1)
+
+        while (c != -1 && c + 1 < value.length())
         {
             char cnext = value.charAt(c + 1);
             if (cnext != '\\' && cnext != 'n' && cnext != 't' && cnext != 'r')
@@ -94,15 +95,28 @@
                 for (; i < n; i++)
                 {
                     char cc = value.charAt(c + i + 1);
-                    if (cc != ' ')
+                    if (cc != ' ') {
                         sub.append(cc);
+                        idx++; //this represents each 'digit' char
+                    }
                     else
                         break;
                 }
+                idx++; //this represents the first escape char
                 int ccode = Integer.parseInt(sub.toString(), 16);
-                sub = new StringBuilder();
-                sub.append(Character.toChars(ccode));
-                value = value.substring(0, c) + sub.toString() + value.substring(c + i + 1);
+                String insert;
+
+                if (ccode == /* nbsp */ 0xA0) {
+                    insert = "\\a0"; //restore nbsp as the encoded form
+                } else if (ccode == /* ZERO WIDTH SPACE */ 0x200B) {
+                    insert = "\\200b"; //restore zero-width space as the encoded form
+                } else {
+                    sub = new StringBuilder();
+                    sub.append(Character.toChars(ccode));
+                    insert = sub.toString();
+                }
+
+                value = value.substring(0, c) + insert + value.substring(c + i + 1);
             }
             else
                 idx += 2;
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/definitions/AppliedVectorDefinition.java b/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/AppliedVectorDefinition.java
index 7cf995b..eccc2b1 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/AppliedVectorDefinition.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/AppliedVectorDefinition.java
@@ -43,6 +43,7 @@
 import org.apache.royale.compiler.definitions.references.IReference;
 import org.apache.royale.compiler.definitions.references.IResolvedQualifiersReference;
 import org.apache.royale.compiler.definitions.references.ReferenceFactory;
+import org.apache.royale.compiler.exceptions.MissingBuiltinException;
 import org.apache.royale.compiler.internal.projects.CompilerProject;
 import org.apache.royale.compiler.internal.scopes.ASScope;
 import org.apache.royale.compiler.internal.scopes.FunctionScope;
@@ -603,6 +604,10 @@
         
         IResolvedQualifiersReference vectorReference = ReferenceFactory.resolvedQualifierQualifiedReference(project.getWorkspace(), vectorImplPackage, baseName);
         IDefinition vectorIDefinition = vectorReference.resolve(project);
+        if(vectorIDefinition == null)
+        {
+            throw new MissingBuiltinException(baseName);
+        }
         assert vectorIDefinition instanceof IClassDefinition :
             "Unable to find: " + vectorReference.getDisplayString();
         return (IClassDefinition) vectorIDefinition;
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/ClassDefinition.java b/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/ClassDefinition.java
index 85a6900..1b07a55 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/ClassDefinition.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/ClassDefinition.java
@@ -315,7 +315,7 @@
         this.constructor = constructor;
 
         if(this.constructor.isPrivate()
-                && this.constructor.getMetaTagByName(IMetaAttributeConstants.ATTRIBUTE_PRIVATE_CONSTRUCTOR) == null)
+                && getMetaTagByName(IMetaAttributeConstants.ATTRIBUTE_PRIVATE_CONSTRUCTOR) == null)
         {
             // ensures that the constructor remains private when compiled into
             // a library because the metadata is how private constructors are
@@ -1383,6 +1383,18 @@
         addMetaTag(excludeClassMetaTag);
     }
 
+
+    /**
+     * Mark this class as being generated with mxml bindings [RoyaleBindings] meta data.
+     */
+    public void setRoyaleBindings()
+    {
+        if (!hasMetaTagByName(IMetaAttributeConstants.ATTRIBUTE_BINDINGS)) {
+            MetaTag bindingsMarker = new MetaTag(this, IMetaAttributeConstants.ATTRIBUTE_BINDINGS, new IMetaTagAttribute[0]);
+            addMetaTag(bindingsMarker);
+        }
+    }
+
     /**
      * For debugging only. Produces a string such as
      * <code>public class B extends A implements I1, I2</code>.
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/DefinitionBase.java b/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/DefinitionBase.java
index c822686..27f617d 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/DefinitionBase.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/DefinitionBase.java
@@ -824,7 +824,8 @@
     @Override
     public boolean isProtected()
     {
-        return namespaceReference instanceof INamespaceDefinition.IProtectedNamespaceDefinition;
+        return namespaceReference instanceof INamespaceDefinition.IProtectedNamespaceDefinition
+                || namespaceReference instanceof INamespaceDefinition.IStaticProtectedNamespaceDefinition;
     }
 
     @Override
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/FunctionDefinition.java b/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/FunctionDefinition.java
index 51f7366..562b4d6 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/FunctionDefinition.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/FunctionDefinition.java
@@ -29,6 +29,7 @@
 import org.apache.royale.compiler.common.DependencyType;
 import org.apache.royale.compiler.constants.IASKeywordConstants;
 import org.apache.royale.compiler.constants.IMetaAttributeConstants;
+import org.apache.royale.compiler.constants.INamespaceConstants;
 import org.apache.royale.compiler.definitions.*;
 import org.apache.royale.compiler.definitions.references.INamespaceReference;
 import org.apache.royale.compiler.definitions.metadata.IMetaTag;
@@ -295,6 +296,18 @@
         }
         if (isConstructor())
         {
+            IFunctionNode funcNode = getFunctionNode();
+            if (funcNode != null
+                    && INamespaceConstants.private_.equals(funcNode.getNamespace()))
+            {
+                // super.isPrivate() checks the namespace reference, but all
+                // constructors always use this namespace reference:
+                // NamespaceDefinition.getCodeModelImplicitDefinitionNamespace()
+                // constructors can't use the normal private reference or
+                // they'll incorrectly show up in scope searches.
+                return true;
+            }
+
             IDefinition parent = getParent();
             if (parent == null)
             {
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/mxml/MXMLTagData.java b/compiler/src/main/java/org/apache/royale/compiler/internal/mxml/MXMLTagData.java
index f57bb08..171f58b 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/mxml/MXMLTagData.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/mxml/MXMLTagData.java
@@ -172,6 +172,11 @@
         return contentEnd;
     }
 
+    protected void setProblems(Collection<ICompilerProblem> problems)
+    {
+        this.problems = problems;
+    }
+
     @SuppressWarnings("fallthrough")
     MutablePrefixMap init(IMXMLData mxmlData, MXMLToken nameToken, ListIterator<MXMLToken> tokenIterator, MXMLDialect dialect, IFileSpecification spec, Collection<ICompilerProblem> problems)
     {
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/as/ASToken.java b/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/as/ASToken.java
index fa8b149..6c2d1c3 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/as/ASToken.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/as/ASToken.java
@@ -616,6 +616,7 @@
             case TOKEN_KEYWORD_NULL:
             case TOKEN_LITERAL_NUMBER:
             case TOKEN_LITERAL_STRING:
+            case TOKEN_OPERATOR_NS_QUALIFIER:
                 return true;
         }
         return false;
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/as/BaseASParser.java b/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/as/BaseASParser.java
index de180fb..99fbc0b 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/as/BaseASParser.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/as/BaseASParser.java
@@ -1256,6 +1256,33 @@
             metadataTokens = tokenizer.parseTokens();
         }
 
+        // manage namespace variables 
+        int i = 2;// skip the metadata type 
+        while (i<metadataTokens.size()-1) {
+            MetadataToken t = metadataTokens.get(i);
+            if (t.getType()==MetadataTokenTypes.TOKEN_ATTR_OPERATOR_NS_QUALIFIER) {
+                // get the previous and next tokens to check there types and transform them as the left and right parts of the operator
+                MetadataToken prev = metadataTokens.get(i - 1);
+                MetadataToken next = metadataTokens.get(i + 1);
+                if (prev.getType()==MetadataTokenTypes.TOKEN_ATTR_UNKNOWN && next.getType()==MetadataTokenTypes.TOKEN_ATTR_UNKNOWN) {
+                    // trasform to literal node if possible
+                    NamespaceIdentifierNode nsNode = new NamespaceIdentifierNode(prev.getText());
+                    nsNode.setIsConfigNamespace(true);
+                    ASToken op = new ASToken(TOKEN_OPERATOR_NS_QUALIFIER, t.getStart(), t.getEnd(), t.getLine(), t.getColumn(), t.getText());
+                    IdentifierNode idNode = new IdentifierNode(next.getText());
+                    IASNode n = transformToNSAccessExpression(nsNode, (ASToken) op, idNode);
+                    if (n instanceof LiteralNode) {
+                        // replace the left, operator and right tokens by the result string token
+                        t = new MetadataToken(MetadataTokenTypes.TOKEN_STRING, prev.getSourcePath(), prev.getStart(), next.getEnd(), prev.getLine(), prev.getColumn(), ((LiteralNode)n).getValue());
+                        metadataTokens.remove(i+1);
+                        metadataTokens.remove(i--);
+                        metadataTokens.set(i, t);
+                    }
+                }
+            }
+            ++i;
+        }
+
         // Initialize metadata parser.
         final GenericTokenStream metadataTokenStream = new GenericTokenStream(metadataTokens);
         final MetadataParser metadataParser = new MetadataParser(metadataTokenStream);
@@ -1791,7 +1818,9 @@
     private boolean handleParsingError(final RecognitionException ex, final ASToken current, final ASToken errorToken, final int endToken)
     {
         // Ignore ASDoc problems.
-        if (current.getType() == ASTokenTypes.TOKEN_ASDOC_COMMENT)
+        if (current.getType() == ASTokenTypes.TOKEN_ASDOC_COMMENT
+                || current.getType() == ASTokenTypes.HIDDEN_TOKEN_SINGLE_LINE_COMMENT
+                || current.getType() == ASTokenTypes.HIDDEN_TOKEN_MULTI_LINE_COMMENT)
         {
             consume();
             return true;
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/as/MetadataTokenizer.java b/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/as/MetadataTokenizer.java
index 56d82b9..663279f 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/as/MetadataTokenizer.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/as/MetadataTokenizer.java
@@ -292,6 +292,15 @@
             {
                 return null;
             }
+            case ASTokenTypes.TOKEN_OPERATOR_NS_QUALIFIER:
+            {
+                if (inAttrList)
+                {
+                    return new MetadataToken(MetadataTokenTypes.TOKEN_ATTR_OPERATOR_NS_QUALIFIER,
+                                         sourcePath, startOffset, endOffset,
+                                         line, column, tokenString);
+                }
+            }
         }
 
         return null;
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/as/RepairingTokenBuffer.java b/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/as/RepairingTokenBuffer.java
index 2f085d3..ceb1efc 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/as/RepairingTokenBuffer.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/as/RepairingTokenBuffer.java
@@ -126,8 +126,8 @@
     @Override
     public ASToken previous()
     {
-        final int prevPos = position - 2;
-        if (prevPos < size && prevPos > 0)
+        final int prevPos = position - 1;
+        if (prevPos < size && prevPos >= 0)
             return tokens[prevPos];
         else
             return eofToken;
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/mxml/BaseRawMXMLTokenizer.java b/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/mxml/BaseRawMXMLTokenizer.java
index 7fd2f9f..f2bd895 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/mxml/BaseRawMXMLTokenizer.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/mxml/BaseRawMXMLTokenizer.java
@@ -22,9 +22,12 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.royale.compiler.common.ISourceLocation;
+import org.apache.royale.compiler.common.SourceLocation;
 import org.apache.royale.compiler.internal.parsing.as.ASToken;
 import org.apache.royale.compiler.parsing.ICMToken;
 import org.apache.royale.compiler.problems.ASDocNotClosedProblem;
+import org.apache.royale.compiler.problems.BadCharacterProblem;
 import org.apache.royale.compiler.problems.CommentNotClosedProblem;
 import org.apache.royale.compiler.problems.ICompilerProblem;
 import org.apache.royale.compiler.problems.MXMLUnclosedTagProblem;
@@ -281,6 +284,29 @@
     {
         getProblems().add(new ASDocNotClosedProblem((ASToken)token));
     }
+
+    protected void reportBadCharacterProblem(String badChar)
+    {
+        ISourceLocation location = getCurrentSourceLocation(badChar.length());
+        ICompilerProblem problem = new BadCharacterProblem(location, badChar);
+        getProblems().add(problem);
+    }
+
+    /**
+     * Create a {@code ISourceLocation} object based on the current lexer state.
+     * 
+     * @param tokenLength Length of the problematic input.
+     * @return Current source location used to report a syntax problem.
+     */
+    protected final ISourceLocation getCurrentSourceLocation(int tokenLength)
+    {
+        return new SourceLocation(
+                sourcePath,
+                getOffset(),
+                getOffset() + tokenLength,
+                getLine(),
+                getColumn());
+    }
     
     protected List<ICompilerProblem> problems = null;
 
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 74b308d..edd5653 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,11 +30,11 @@
 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;
 import org.apache.royale.compiler.config.CompilerDiagnosticsConstants;
-import org.apache.royale.compiler.definitions.IDefinition;
 import org.apache.royale.compiler.definitions.INamespaceDefinition;
 import org.apache.royale.compiler.definitions.metadata.IMetaTag;
 import org.apache.royale.compiler.definitions.references.INamespaceReference;
@@ -68,7 +68,6 @@
 import org.apache.royale.compiler.mxml.IMXMLUnitData;
 import org.apache.royale.compiler.problems.ICompilerProblem;
 import org.apache.royale.compiler.problems.MXMLLibraryTagNotTheFirstChildProblem;
-import org.apache.royale.compiler.problems.MXMLUnresolvedTagProblem;
 
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Iterables;
@@ -107,7 +106,6 @@
         fileScope.addDefinition(packageDefinition);
         
         problems = new LinkedList<ICompilerProblem>();
-        problems.addAll(mxmlData.getProblems());
 
         includeHandler = new IncludeHandler(fileSpecGetter);
         includeHandler.setProjectAndCompilationUnit(project, compilationUnit);
@@ -211,11 +209,11 @@
 
         if (baseClass instanceof IResolvedQualifiersReference)
         {
-            IDefinition baseDef = ((IResolvedQualifiersReference)baseClass).resolve(project);
-            if (baseDef == null)
-                problems.add(new MXMLUnresolvedTagProblem(rootTag));
-            else
-                currentClassScope.addImport(baseDef.getQualifiedName());           
+            // don't try to resolve the definition here because it can lead to
+            // the compiler getting into a deadlock. previously, we checked
+            // whether the definition resolved, but that is also handled in
+            // MXMLFileNode, so it was redundant and we can skip it. -JT
+            currentClassScope.addImport(baseClass.getDisplayString());
         }
 
         currentClassDefinition.setContainedScope(currentClassScope);
@@ -663,7 +661,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/parsing/mxml/MXMLTagDataDepth.java b/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/mxml/MXMLTagDataDepth.java
index 0af74b1..3b84709 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/mxml/MXMLTagDataDepth.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/mxml/MXMLTagDataDepth.java
@@ -66,12 +66,18 @@
         public FakeMXMLTagData(String tagName, boolean closeTag, boolean emptyTag) {
             this.tagName = tagName;
             nameType = closeTag ? MXMLTokenTypes.TOKEN_CLOSE_TAG_START : MXMLTokenTypes.TOKEN_OPEN_TAG_START;
-            this.emptyTag = emptyTag;
+			this.emptyTag = emptyTag;
+
+			// a call to findMatchingEndTag() will fail without this
+			this.setProblems(new ArrayList<ICompilerProblem>());
         }
         
         public FakeMXMLTagData(MXMLTagData data, boolean emptyTag) {
             super(data);
             this.emptyTag = emptyTag;
+
+			// a call to findMatchingEndTag() will fail without this
+			this.setProblems(new ArrayList<ICompilerProblem>());
         }
 
         @Override
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleProject.java b/compiler/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleProject.java
index b85c412..0613ffe 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleProject.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleProject.java
@@ -92,6 +92,7 @@
 import org.apache.royale.compiler.tree.ASTNodeID;
 import org.apache.royale.compiler.tree.as.IASNode;
 import org.apache.royale.compiler.tree.as.IImportNode;
+import org.apache.royale.compiler.tree.mxml.IMXMLClassDefinitionNode;
 import org.apache.royale.compiler.units.ICompilationUnit;
 import org.apache.royale.compiler.units.requests.IOutgoingDependenciesRequestResult;
 import org.apache.royale.compiler.units.requests.IRequest;
@@ -2249,9 +2250,10 @@
      * it isn't allowed in an ActionScript identifier or MXML id. It also can't
      * conflict with any dynamic properties, because MXML classes are sealed.
      */
-    public String getGeneratedIDBase()
+    public String getGeneratedIDBase(IMXMLClassDefinitionNode definitionNode)
     {
-        return "#";
+        IClassDefinition classDefinition = definitionNode.getDefinition();
+        return "#_"+classDefinition.resolveAncestry(this).length+"_";
     }
     
     @Override
@@ -2620,12 +2622,12 @@
     }
 
 
-    private WeakHashMap<IClassDefinition, BindingDatabase> bindingMap = new WeakHashMap<IClassDefinition, BindingDatabase>();
+    private HashMap<IClassDefinition, BindingDatabase> bindingMap = new HashMap<IClassDefinition, BindingDatabase>();
     /**
      * Support for access to BindingData from the class definition as key.
      * @return
      */
-    public WeakHashMap<IClassDefinition, BindingDatabase> getBindingMap(){
+    public HashMap<IClassDefinition, BindingDatabase> getBindingMap(){
         return bindingMap;
     }
 
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/scopes/ASScope.java b/compiler/src/main/java/org/apache/royale/compiler/internal/scopes/ASScope.java
index faa68c3..33bcc66 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/scopes/ASScope.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/scopes/ASScope.java
@@ -1141,7 +1141,7 @@
     {
 
         assert accumulator.isEmpty() : "findProperty() should not be called with a non-empty collection";
-        assert baseName.indexOf('.') == -1 : "baseName must not be any sort of qname";
+        assert baseName.indexOf('.') == -1 : "baseName must not be any sort of qname " + baseName;
 
         // Walk the scope chain starting with this scope.
         // This loop may go as far as the file scope, whose containing scope is null. 
@@ -1462,7 +1462,7 @@
             // which may have already computed and cached the result.
             return getContainingScope().findProperty(project, baseName, dt, canEscapeWith);
         }
-        assert baseName.indexOf('.') == -1 : "baseName must not be any sort of qname";
+        assert baseName.indexOf('.') == -1 : "baseName must not be any sort of qname " + baseName;
         CompilerProject compilerProject = (CompilerProject)project;
         ASScopeCache scopeCache = compilerProject.getCacheForScope(this);
         return filterWith(scopeCache.findProperty(baseName, dt, canEscapeWith), canEscapeWith);
@@ -1622,7 +1622,7 @@
      */
     public IDefinition findPropertyQualified(ICompilerProject project, INamespaceDefinition qual, String baseName, DependencyType dt, boolean canEscapeWith)
     {
-        assert baseName.indexOf('.') == -1 : "baseName must not be any sort of qname";
+        assert baseName.indexOf('.') == -1 : "baseName must not be any sort of qname " + baseName;
 
         // Can't find a property if we don't know what its qualifier is
         if( qual == null )
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/scopes/ASScopeCache.java b/compiler/src/main/java/org/apache/royale/compiler/internal/scopes/ASScopeCache.java
index d3dff76..5961c46 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/scopes/ASScopeCache.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/scopes/ASScopeCache.java
@@ -23,6 +23,7 @@
 import org.apache.royale.compiler.config.CompilerDiagnosticsConstants;
 import org.apache.royale.compiler.constants.IASLanguageConstants;
 import org.apache.royale.compiler.definitions.IDefinition;
+import org.apache.royale.compiler.definitions.IFunctionDefinition;
 import org.apache.royale.compiler.definitions.IInterfaceDefinition;
 import org.apache.royale.compiler.definitions.INamespaceDefinition;
 import org.apache.royale.compiler.definitions.ITypeDefinition;
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/as/FunctionNode.java b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/as/FunctionNode.java
index 8fc51e3..1a5bf10 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/as/FunctionNode.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/as/FunctionNode.java
@@ -675,16 +675,8 @@
                         classNode.constructorNode = this;
                     }
                 }
-                // if the namespace reference is private, don't change it
-                if(!(funcDef.getNamespaceReference() instanceof INamespaceDefinition.IPrivateNamespaceDefinition))
-                {
-                    funcDef.setNamespaceReference(NamespaceDefinition.getCodeModelImplicitDefinitionNamespace());
-                }
             }
-            else
-            {
-                funcDef.setNamespaceReference(NamespaceDefinition.getCodeModelImplicitDefinitionNamespace());
-            }
+            funcDef.setNamespaceReference(NamespaceDefinition.getCodeModelImplicitDefinitionNamespace());
         }
     }
 
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLArrayNode.java b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLArrayNode.java
index af2ec7e..6930281 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLArrayNode.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLArrayNode.java
@@ -30,13 +30,11 @@
 import org.apache.royale.compiler.definitions.IDefinition;
 import org.apache.royale.compiler.definitions.ITypeDefinition;
 import org.apache.royale.compiler.definitions.IVariableDefinition;
-import org.apache.royale.compiler.internal.definitions.ClassDefinition;
 import org.apache.royale.compiler.internal.mxml.MXMLDialect.TextParsingFlags;
 import org.apache.royale.compiler.internal.parsing.ISourceFragment;
 import org.apache.royale.compiler.internal.parsing.SourceFragmentsReader;
 import org.apache.royale.compiler.internal.projects.RoyaleProject;
 import org.apache.royale.compiler.internal.tree.as.NodeBase;
-import org.apache.royale.compiler.mxml.IMXMLLanguageConstants;
 import org.apache.royale.compiler.mxml.IMXMLTagData;
 import org.apache.royale.compiler.mxml.IMXMLTextData;
 import org.apache.royale.compiler.mxml.IMXMLUnitData;
@@ -160,20 +158,9 @@
         }
         else
         {
-            String uri = childTag.getURI();
-            if (uri != null && uri.equals(IMXMLLanguageConstants.NAMESPACE_MXML_2009))
-            {
-                MXMLInstanceNode instanceNode = MXMLInstanceNode.createInstanceNode(
-                        builder, childTag.getShortName(), this);
-                instanceNode.setClassReference(project, childTag.getShortName());
-                instanceNode.initializeFromTag(builder, childTag);
-                info.addChildNode(instanceNode);
-            }
-            else
-            {
-                builder.addProblem(new MXMLUnresolvedTagProblem(childTag));
-                return;
-            }
+            MXMLUnresolvedTagProblem problem = new MXMLUnresolvedTagProblem(childTag);
+            builder.addProblem(problem);
+            return;
         }
     }
 
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLClassDefinitionNode.java b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLClassDefinitionNode.java
index 5cfd2d2..e4d16f9 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLClassDefinitionNode.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLClassDefinitionNode.java
@@ -754,7 +754,7 @@
         {
             if (generatedIDMap.containsKey(instanceNode))
                 return;
-            String id = project.getGeneratedIDBase() + generatedIDCounter++;
+            String id = project.getGeneratedIDBase(this) + generatedIDCounter++;
             generatedIDMap.put(instanceNode, id);
         }
     }
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLDataBindingParser.java b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLDataBindingParser.java
index 5b3e8dc..d25b814 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLDataBindingParser.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLDataBindingParser.java
@@ -78,6 +78,11 @@
      */
     private static final char BACKSLASH = '\\';
 
+    public static boolean willParse(ISourceFragment[] fragments)
+    {
+        return scan(fragments) != null;
+    }
+
     /**
      * Parses source fragments looking for databinding expressions.
      * <p>
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLDeclarationsNode.java b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLDeclarationsNode.java
index f38b1d0..caa9dc2 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLDeclarationsNode.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLDeclarationsNode.java
@@ -19,7 +19,6 @@
 
 package org.apache.royale.compiler.internal.tree.mxml;
 
-import org.apache.royale.compiler.constants.IASLanguageConstants;
 import org.apache.royale.compiler.definitions.IClassDefinition;
 import org.apache.royale.compiler.definitions.IDefinition;
 import org.apache.royale.compiler.internal.definitions.ClassDefinition;
@@ -28,6 +27,7 @@
 import org.apache.royale.compiler.internal.tree.as.NodeBase;
 import org.apache.royale.compiler.mxml.IMXMLLanguageConstants;
 import org.apache.royale.compiler.mxml.IMXMLTagData;
+import org.apache.royale.compiler.problems.MXMLUnresolvedTagProblem;
 import org.apache.royale.compiler.tree.ASTNodeID;
 import org.apache.royale.compiler.tree.as.IASNode;
 import org.apache.royale.compiler.tree.mxml.IMXMLDeclarationsNode;
@@ -90,23 +90,9 @@
             }
             else 
             {
-                String uri = childTag.getURI();
-                if (uri != null && uri.equals(IMXMLLanguageConstants.NAMESPACE_MXML_2009))
-                {
-                    String shortName = childTag.getShortName();
-                    // for some reason, the factory is looking for the full qname
-                    if (shortName.equals(IASLanguageConstants.Vector))
-                        shortName = IASLanguageConstants.Vector_qname;
-                    MXMLInstanceNode instanceNode = MXMLInstanceNode.createInstanceNode(
-                            builder, shortName, this);
-                    instanceNode.setClassReference(project, childTag.getShortName());
-                    instanceNode.initializeFromTag(builder, childTag);
-                    info.addChildNode(instanceNode);
-                }
-                else
-                {
-                    super.processChildTag(builder, tag, childTag, info);
-                }
+                MXMLUnresolvedTagProblem problem = new MXMLUnresolvedTagProblem(childTag);
+                builder.addProblem(problem);
+                return;
             }
         }
     }
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLFileNode.java b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLFileNode.java
index e9c5517..065dd85 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLFileNode.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLFileNode.java
@@ -56,6 +56,7 @@
 import org.apache.royale.compiler.problems.MXMLContentAfterRootTagProblem;
 import org.apache.royale.compiler.problems.MXMLContentBeforeRootTagProblem;
 import org.apache.royale.compiler.problems.MXMLFinalClassProblem;
+import org.apache.royale.compiler.problems.MXMLInvalidComponentNameProblem;
 import org.apache.royale.compiler.problems.MXMLMissingRootTagProblem;
 import org.apache.royale.compiler.problems.MXMLMultipleRootTagsProblem;
 import org.apache.royale.compiler.problems.MXMLNotAClassProblem;
@@ -224,11 +225,35 @@
         }
     }
 
+    private boolean isValidClassName(String className)
+    {
+        if (className == null || className.length() == 0 || !Character.isJavaIdentifierStart(className.charAt(0)))
+        {
+            return false;
+        }
+
+        for (int i=1; i < className.length(); i++)
+        {
+            if (!Character.isJavaIdentifierPart((className.charAt(i))))
+            {
+                return false;
+            }
+        }
+
+        return true;
+    }
+
     private void processRootTag(MXMLTreeBuilder builder, IMXMLTagData rootTag, IMXMLTextData asDoc)
     {
         ClassDefinition fileDef = fileScope.getMainClassDefinition();
         assert fileDef != null;
 
+        if(!isValidClassName(fileDef.getBaseName())) {
+            ICompilerProblem problem = new MXMLInvalidComponentNameProblem(this, fileDef.getBaseName());
+            builder.addProblem(problem);
+            return;
+        }
+
         IDefinition tagDef = builder.getFileScope().resolveTagToDefinition(rootTag);
 
         // Report a problem if the root tag doesn't map to a definition.
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/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLPropertySpecifierNode.java b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLPropertySpecifierNode.java
index f36dc16..ff77c65 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLPropertySpecifierNode.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLPropertySpecifierNode.java
@@ -47,7 +47,6 @@
 import org.apache.royale.compiler.internal.scopes.MXMLFileScope;
 import org.apache.royale.compiler.internal.scopes.TypeScope;
 import org.apache.royale.compiler.internal.tree.as.NodeBase;
-import org.apache.royale.compiler.mxml.IMXMLLanguageConstants;
 import org.apache.royale.compiler.mxml.IMXMLTagAttributeData;
 import org.apache.royale.compiler.mxml.IMXMLTagData;
 import org.apache.royale.compiler.mxml.IMXMLTextData;
@@ -527,19 +526,9 @@
                 }
                 else
                 {
-                    String uri = childTag.getURI();
-                    if (uri != null && uri.equals(IMXMLLanguageConstants.NAMESPACE_MXML_2009))
-                    {
-                        instanceNode = MXMLInstanceNode.createInstanceNode(
-                                builder, childTag.getShortName(), this);
-                        instanceNode.setClassReference(project, childTag.getShortName());
-                        instanceNode.initializeFromTag(builder, childTag);
-                    }
-                    else
-                    {
-                        ICompilerProblem problem = new MXMLUnresolvedTagProblem(childTag);
-                        builder.addProblem(problem);
-                    }
+                    MXMLUnresolvedTagProblem problem = new MXMLUnresolvedTagProblem(childTag);
+                    builder.addProblem(problem);
+                    return;
                 }
             }
 
@@ -612,7 +601,10 @@
         // then create an implicit Array tag and initialize it from the
         // child tags of the property tag.
         IDefinition definition = getDefinition();
-        if (definition != null && definition.getTypeAsDisplayString().equals(IASLanguageConstants.Array))
+        if (definition != null
+                && definition.getTypeAsDisplayString().equals(IASLanguageConstants.Array)
+                // don't crate an implicit MXML Array if the contents parse to a data binding expression -JT
+                && !MXMLDataBindingParser.willParse(info.getSourceFragments()))
         {
             if (instanceNode == null || ((!(instanceNode instanceof MXMLArrayNode)) &&
                 !instanceNode.getClassReference(project).getQualifiedName().equals(IASLanguageConstants.Array)))
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLTreeBuilder.java b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLTreeBuilder.java
index a054f32..1b37da7 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLTreeBuilder.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLTreeBuilder.java
@@ -353,7 +353,10 @@
     {
         Object result = null;
 
-        String typeName = type.getQualifiedName();
+        String typeName = IASLanguageConstants.ANY_TYPE;
+        if (type != null) {
+            typeName = type.getQualifiedName();
+        }
 
         if (typeName.equals(IASLanguageConstants.Boolean))
         {
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLVectorNode.java b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLVectorNode.java
index 19db659..b072549 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLVectorNode.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLVectorNode.java
@@ -27,6 +27,7 @@
 import org.apache.royale.compiler.problems.MXMLInvalidVectorFixedAttributeProblem;
 import org.apache.royale.compiler.problems.MXMLInvalidVectorTypeAttributeProblem;
 import org.apache.royale.compiler.problems.MXMLMissingVectorTypeAttributeProblem;
+import org.apache.royale.compiler.problems.MXMLUnresolvedTagProblem;
 import org.apache.royale.compiler.projects.ICompilerProject;
 import org.apache.royale.compiler.common.DependencyType;
 import org.apache.royale.compiler.constants.IASLanguageConstants;
@@ -220,7 +221,9 @@
         }
         else
         {
-            super.processChildTag(builder, tag, childTag, info);
+            MXMLUnresolvedTagProblem problem = new MXMLUnresolvedTagProblem(childTag);
+            builder.addProblem(problem);
+            return;
         }
     }
 
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/units/MXMLCompilationUnit.java b/compiler/src/main/java/org/apache/royale/compiler/internal/units/MXMLCompilationUnit.java
index 13c587b..e8f000d 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/units/MXMLCompilationUnit.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/units/MXMLCompilationUnit.java
@@ -114,6 +114,9 @@
                 {
                     TypeScope mainClassScope = (TypeScope)mainClassDefinition.getContainedScope();
                     documentNode.setScope(mainClassScope);
+                    if (documentNode.getHasDataBindings()) {
+                        mainClassDefinition.setRoyaleBindings();
+                    }
                 }
             }
             
diff --git a/compiler/src/main/java/org/apache/royale/compiler/problems/MXMLInvalidComponentNameProblem.java b/compiler/src/main/java/org/apache/royale/compiler/problems/MXMLInvalidComponentNameProblem.java
new file mode 100644
index 0000000..62d6733
--- /dev/null
+++ b/compiler/src/main/java/org/apache/royale/compiler/problems/MXMLInvalidComponentNameProblem.java
@@ -0,0 +1,40 @@
+/*
+ *
+ *  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.problems;
+
+import org.apache.royale.compiler.tree.mxml.IMXMLFileNode;
+
+/**
+ * Problem generated when the <code>id</code> attribute 
+ * is an invalid ActionScript identifier.
+ */
+public final class MXMLInvalidComponentNameProblem extends MXMLSemanticProblem
+{
+    public static final String DESCRIPTION =
+        "The component name '${componentName}' is not a valid ActionScript identifier.";
+    
+    public MXMLInvalidComponentNameProblem(IMXMLFileNode site, String componentName)
+    {
+        super(site);
+		this.componentName = componentName;
+    }
+    
+    public String componentName;
+}
diff --git a/compiler/src/main/java/org/apache/royale/compiler/projects/IRoyaleProject.java b/compiler/src/main/java/org/apache/royale/compiler/projects/IRoyaleProject.java
index b003466..0836a82 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/projects/IRoyaleProject.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/projects/IRoyaleProject.java
@@ -250,6 +250,6 @@
      * Support for access to BindingData from the class definition as key.
      * @return
      */
-    WeakHashMap<IClassDefinition, BindingDatabase> getBindingMap();
+    HashMap<IClassDefinition, BindingDatabase> getBindingMap();
 
 }
diff --git a/compiler/src/main/java/org/apache/royale/utils/ArrayLikeUtil.java b/compiler/src/main/java/org/apache/royale/utils/ArrayLikeUtil.java
index c1da300..dce1874 100644
--- a/compiler/src/main/java/org/apache/royale/utils/ArrayLikeUtil.java
+++ b/compiler/src/main/java/org/apache/royale/utils/ArrayLikeUtil.java
@@ -933,6 +933,14 @@
         BlockNode block = target.getContentsNode();
         //'insert' at position 0 to prepend this to the original loop's block content
         block.addChild(iteratee, 0);
+        //if a) the child count was one previously [it is now 2] *and* b) it was an implicit Block
+        if (block.getChildCount() == 2 && block.getContainerType() == IContainerNode.ContainerType.IMPLICIT) {
+            //we set it as 'explicit' even though it is not. This is particularly helpful in implementations like compiler-jx because it
+            //provides a clue for expression of the loop content with explicit block braces, instead of as it is in the original
+            //code where they were not needed. For swf bytecode expression this change is not needed, but also has no downside.
+            block.setContainerType(IContainerNode.ContainerType.BRACES);
+        }
+
         EnumSet<PostProcessStep> set = EnumSet.of(
                 PostProcessStep.POPULATE_SCOPE);
         //only add the iteratee to the analysis. re-evaluating the original variable node (if it is not a pre-existing identifier)
diff --git a/compiler/src/main/jflex/org/apache/royale/compiler/internal/parsing/mxml/RawMXMLTokenizer.lex b/compiler/src/main/jflex/org/apache/royale/compiler/internal/parsing/mxml/RawMXMLTokenizer.lex
index be7802b..201f961 100644
--- a/compiler/src/main/jflex/org/apache/royale/compiler/internal/parsing/mxml/RawMXMLTokenizer.lex
+++ b/compiler/src/main/jflex/org/apache/royale/compiler/internal/parsing/mxml/RawMXMLTokenizer.lex
@@ -532,4 +532,5 @@
 
 <YYINITIAL, MARKUP, STRING1, STRING2, MARKUP_IGNORE, STRING1_IGNORE, STRING2_IGNORE> .
 {
+	reportBadCharacterProblem(yytext());
 }
diff --git a/compiler/src/test/resources/mxml-2009-manifest.xml b/compiler/src/test/resources/mxml-2009-manifest.xml
index 9795445..cf5b013 100644
--- a/compiler/src/test/resources/mxml-2009-manifest.xml
+++ b/compiler/src/test/resources/mxml-2009-manifest.xml
@@ -37,7 +37,7 @@
     <component id="RegExp" class="RegExp" lookupOnly="true"/>
     <component id="String" class="String" lookupOnly="true"/>
     <component id="uint" class="uint" lookupOnly="true"/>
-	<component id="Vector" class="__AS3__.vec.Vector" lookupOnly="true"/>
+    <component id="Vector" class="__AS3__.vec.Vector" lookupOnly="true"/>
     <component id="XML" class="XML" lookupOnly="true"/>
     <component id="XMLList" class="XMLList" lookupOnly="true"/>
 
diff --git a/debugger/pom.xml b/debugger/pom.xml
index bf33e15..1b8d805 100644
--- a/debugger/pom.xml
+++ b/debugger/pom.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>

+<?xml version="1.0" encoding="UTF-8"?>
 <!--
 
   Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,111 +16,125 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 
---><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

-  <modelVersion>4.0.0</modelVersion>

-

-  <parent>

-    <groupId>org.apache.royale.compiler</groupId>

-    <artifactId>royale-compiler-parent</artifactId>

-    <version>0.9.7</version>

-  </parent>

-

-  <artifactId>debugger</artifactId>

-  <version>0.9.7</version>

-

-  <name>Apache Royale: Compiler: Debugger</name>

-

-  <build>

-    <plugins>

+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.royale.compiler</groupId>
+    <artifactId>royale-compiler-parent</artifactId>
+    <version>0.9.8</version>
+  </parent>
+
+  <artifactId>debugger</artifactId>
+  <version>0.9.8</version>
+
+  <name>Apache Royale: Compiler: Debugger</name>
+
+  <build>
+    <plugins>
       <!--
 Do all the JBurg code generation.
--->

-      <plugin>

-        <groupId>net.sourceforge.jburg</groupId>

-        <artifactId>jburg-maven-plugin</artifactId>

-        <extensions>true</extensions>

-        <executions>

-          <execution>

-            <id>generate-debugger</id>

-            <goals>

-              <goal>generate</goal>

-            </goals>

-            <configuration>

-              <includes>

-                <include>AS3DebuggerBURM.jbg</include>

+-->
+      <plugin>
+        <groupId>net.sourceforge.jburg</groupId>
+        <artifactId>jburg-maven-plugin</artifactId>
+        <extensions>true</extensions>
+        <executions>
+          <execution>
+            <id>generate-debugger</id>
+            <goals>
+              <goal>generate</goal>
+            </goals>
+            <configuration>
+              <includes>
+                <include>AS3DebuggerBURM.jbg</include>
                 <!--include>AS3DebuggerCompoundAssignmentRules.jbg</include>
-                <include>AS3DebuggerRules.jbg</include-->

-              </includes>

-              <sourceDirectory>src/main/jburg/flash/tools/debugger/expression</sourceDirectory>

-              <outputDirectory>target/generated-sources/jburg/flash/tools/debugger/expression</outputDirectory>

-            </configuration>

-          </execution>

-        </executions>

-        <configuration>

-          <!-- debug=true generates the "dump" method for Emitters, which is used for debugging -->

-          <!--debug>true</debug-->

-        </configuration>

-        <dependencies>

-            <!-- this needs to be first in order to patch jburg -->

-          <dependency>

-            <groupId>org.apache.royale.compiler</groupId>

-            <artifactId>compiler-jburg-types</artifactId>

-            <version>${compiler-jburg-types.version}</version>

-          </dependency>

-          <dependency>

-            <groupId>net.sourceforge.jburg</groupId>

-            <artifactId>jburg</artifactId>

-            <version>1.10.3</version>

-          </dependency>

-        </dependencies>

-      </plugin>

-    </plugins>

-  </build>

-

-  <dependencies>

-    <dependency>

-      <groupId>org.apache.royale.compiler</groupId>

-      <artifactId>compiler</artifactId>

-      <version>0.9.7</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.royale.compiler</groupId>

-      <artifactId>swfutils</artifactId>

-      <version>0.9.7</version>

-    </dependency>

-    <dependency>

-      <groupId>commons-lang</groupId>

-      <artifactId>commons-lang</artifactId>

-      <version>2.6</version>

-    </dependency>

-

-    <dependency>

-      <groupId>args4j</groupId>

-      <artifactId>args4j</artifactId>

-      <version>2.0.28</version>

-    </dependency>

-    <dependency>

-      <groupId>org.codeartisans</groupId>

-      <artifactId>org.json</artifactId>

-      <version>20131017</version>

-    </dependency>

-    <dependency>

-      <groupId>com.google.javascript</groupId>

-      <artifactId>closure-compiler</artifactId>

-      <version>v20181210</version>

-    </dependency>

-    <dependency>

-      <groupId>org.clojure</groupId>

-      <artifactId>google-closure-library</artifactId>

-      <version>0.0-20170809-b9c14c6b</version>

-    </dependency>

-

-    <dependency>

-      <groupId>junit</groupId>

-      <artifactId>junit</artifactId>

-      <version>4.10</version>

-      <scope>test</scope>

-    </dependency>

-  </dependencies>

-

-<properties><project.build.outputTimestamp>2020-05-07T15:02:12Z</project.build.outputTimestamp></properties></project>

+                <include>AS3DebuggerRules.jbg</include-->
+              </includes>
+              <sourceDirectory>src/main/jburg/flash/tools/debugger/expression</sourceDirectory>
+              <outputDirectory>target/generated-sources/jburg/flash/tools/debugger/expression</outputDirectory>
+            </configuration>
+          </execution>
+        </executions>
+        <configuration>
+          <!-- debug=true generates the "dump" method for Emitters, which is used for debugging -->
+          <!--debug>true</debug-->
+        </configuration>
+        <dependencies>
+            <!-- this needs to be first in order to patch jburg -->
+          <dependency>
+            <groupId>org.apache.royale.compiler</groupId>
+            <artifactId>compiler-jburg-types</artifactId>
+            <version>${compiler-jburg-types.version}</version>
+          </dependency>
+          <dependency>
+            <groupId>net.sourceforge.jburg</groupId>
+            <artifactId>jburg</artifactId>
+            <version>1.10.3</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+      <plugin>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifest>
+              <addClasspath>false</addClasspath>
+            </manifest>
+            <manifestEntries>
+              <!-- These paths are all defined the way the layout will be in the distribution -->
+              <Class-Path>compiler.jar compiler-common.jar swfutils.jar external/commons-lang.jar</Class-Path>
+            </manifestEntries>
+          </archive>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.royale.compiler</groupId>
+      <artifactId>compiler</artifactId>
+      <version>0.9.8</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.compiler</groupId>
+      <artifactId>swfutils</artifactId>
+      <version>0.9.8</version>
+    </dependency>
+    <dependency>
+      <groupId>commons-lang</groupId>
+      <artifactId>commons-lang</artifactId>
+      <version>2.6</version>
+    </dependency>
+
+    <dependency>
+      <groupId>args4j</groupId>
+      <artifactId>args4j</artifactId>
+      <version>2.0.28</version>
+    </dependency>
+    <dependency>
+      <groupId>org.codeartisans</groupId>
+      <artifactId>org.json</artifactId>
+      <version>20131017</version>
+    </dependency>
+    <dependency>
+      <groupId>com.google.javascript</groupId>
+      <artifactId>closure-compiler</artifactId>
+      <version>v20181210</version>
+    </dependency>
+    <dependency>
+      <groupId>org.clojure</groupId>
+      <artifactId>google-closure-library</artifactId>
+      <version>0.0-20170809-b9c14c6b</version>
+    </dependency>
+
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.10</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+<properties /></project>
diff --git a/flex-compiler-oem/pom.xml b/flex-compiler-oem/pom.xml
index c78a222..7e4d3d2 100644
--- a/flex-compiler-oem/pom.xml
+++ b/flex-compiler-oem/pom.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>

+<?xml version="1.0" encoding="UTF-8"?>
 <!--
 
   Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,36 +16,56 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 
---><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

-  <modelVersion>4.0.0</modelVersion>

-

-  <parent>

-    <groupId>org.apache.royale.compiler</groupId>

-    <artifactId>royale-compiler-parent</artifactId>

-    <version>0.9.7</version>

-  </parent>

-

-  <artifactId>flex-compiler-oem</artifactId>

-  <version>0.9.7</version>

-

-  <name>Apache Royale: Compiler: OEM Layer</name>

-

-  <dependencies>

-    <dependency>

-      <groupId>org.apache.royale.compiler</groupId>

-      <artifactId>compiler</artifactId>

-      <version>0.9.7</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.royale.compiler</groupId>

-      <artifactId>compiler-jx</artifactId>

-      <version>0.9.7</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.royale.compiler</groupId>

-      <artifactId>swfutils</artifactId>

-      <version>0.9.7</version>

-    </dependency>

-  </dependencies>

-

-<properties><project.build.outputTimestamp>2020-05-07T15:02:12Z</project.build.outputTimestamp></properties></project>

+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.royale.compiler</groupId>
+    <artifactId>royale-compiler-parent</artifactId>
+    <version>0.9.8</version>
+  </parent>
+
+  <artifactId>flex-compiler-oem</artifactId>
+  <version>0.9.8</version>
+
+  <name>Apache Royale: Compiler: OEM Layer</name>
+
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifest>
+              <addClasspath>false</addClasspath>
+              <mainClass>flex2.tools.Mxmlc</mainClass>
+            </manifest>
+            <manifestEntries>
+              <!-- These paths are all defined the way the layout will be in the distribution -->
+              <Class-Path>compiler.jar swfutils.jar ../js/lib/jsc.jar</Class-Path>
+            </manifestEntries>
+          </archive>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.royale.compiler</groupId>
+      <artifactId>compiler</artifactId>
+      <version>0.9.8</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.compiler</groupId>
+      <artifactId>compiler-jx</artifactId>
+      <version>0.9.8</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.compiler</groupId>
+      <artifactId>swfutils</artifactId>
+      <version>0.9.8</version>
+    </dependency>
+  </dependencies>
+
+<properties /></project>
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
diff --git a/pom.xml b/pom.xml
index 39a36c9..f8aa0c7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>

+<?xml version="1.0" encoding="UTF-8"?>
 <!--
 
   Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,785 +16,762 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 
---><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

-  <modelVersion>4.0.0</modelVersion>

-

-  <parent>

-    <groupId>org.apache</groupId>

-    <artifactId>apache</artifactId>

-    <version>23</version>

-  </parent>

-

-  <groupId>org.apache.royale.compiler</groupId>

-  <artifactId>royale-compiler-parent</artifactId>

-  <version>0.9.7</version>

-  <packaging>pom</packaging>

-

-  <name>Apache Royale: Compiler: Parent</name>

-  <description>The Apache Royale Project</description>

-  

-  <scm>

-    <connection>scm:git:https://gitbox.apache.org/repos/asf/royale-compiler.git</connection>

-    <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/royale-compiler.git</developerConnection>

-    <url>https://github.com/apache/royale-compiler</url>

-    <tag>org.apache.royale.compiler-0.9.7-rc5</tag>

-  </scm>

-

-  <properties>

-    <java.version>1.8</java.version>

-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

-    <project.reporting.outputencoding>UTF-8</project.reporting.outputencoding>

-    <maven.version>3.3.1</maven.version>

-

-    <compiler-build-tools.version>1.2.0</compiler-build-tools.version>

-    <compiler-jburg-types.version>1.1.0</compiler-jburg-types.version>

-

-    <flex.version>4.15.0</flex.version>

-    <flash.version>20.0</flash.version>

-    <air.version>20.0</air.version>

-    <option.withSwf.enabled>false</option.withSwf.enabled>

-

-    <release-profiles>apache-release,option-with-swf</release-profiles>

-  <project.build.outputTimestamp>2020-05-07T15:02:12Z</project.build.outputTimestamp></properties>

-

-  <!-- Only configure the site distribution as the rest is handled by the apache parent -->

-  <distributionManagement>

-    <site>

-      <id>apache.website</id>

-      <url>scm:git:https://gitbox.apache.org/repos/asf/royale-compiler.git</url>

-    </site>

-  </distributionManagement>

-

-  <issueManagement>

-    <system>GitHub</system>

-    <url>https://github.com/apache/royale-compiler/issues</url>

-  </issueManagement>

-

-  <mailingLists>

-    <mailingList>

-      <name>Apache Royale User List</name>

-      <subscribe>users-subscribe@royale.apache.org</subscribe>

-      <unsubscribe>users-unsubscribe@royale.apache.org</unsubscribe>

-      <post>users@royale.apache.org</post>

-      <archive>http://mail-archives.apache.org/mod_mbox/royale-users/</archive>

-    </mailingList>

-    <mailingList>

-      <name>Apache Royale Developer List</name>

-      <subscribe>dev-subscribe@royale.apache.org</subscribe>

-      <unsubscribe>dev-unsubscribe@royale.apache.org</unsubscribe>

-      <post>dev@royale.apache.org</post>

-      <archive>http://mail-archives.apache.org/mod_mbox/royale-dev/</archive>

-    </mailingList>

-  </mailingLists>

-

-  <modules>

-    <module>compiler-common</module>

-    <module>compiler-externc</module>

-    <module>compiler</module>

-    <module>compiler-jx</module>

-    <module>compiler-test-utils</module>

-    <module>swfutils</module>

-    <module>debugger</module>

-    <module>flex-compiler-oem</module>

-    <module>royale-ant-tasks</module>

-    <module>royaleunit-ant-tasks</module>

-    <!--<module>royale-maven-extension</module>-->

-    <module>royale-maven-plugin</module>

-  </modules>

-

-  <build>

-    <plugins>

-      <!-- Execute some checks if the environment ist correctly configured -->

-      <plugin>

-        <groupId>org.codehaus.gmaven</groupId>

-        <artifactId>groovy-maven-plugin</artifactId>

-        <executions>

-          <!-- Do some pre-build checks and report any findings to the user -->

-          <execution>

-            <id>prerequisite-check</id>

-            <phase>validate</phase>

-            <goals>

-              <goal>execute</goal>

-            </goals>

-            <inherited>false</inherited>

-            <configuration>

-              <source>${project.basedir}/src/main/script/prerequisiteCheck.groovy</source>

-            </configuration>

-          </execution>

-        </executions>

-      </plugin>

-

-      <!-- Check if all source files have the required apache license headers -->

-      <plugin>

-        <groupId>org.apache.rat</groupId>

-        <artifactId>apache-rat-plugin</artifactId>

-        <executions>

-          <execution>

-            <id>license-check</id>

-            <phase>verify</phase>

-            <goals>

-              <goal>check</goal>

-            </goals>

-          </execution>

-        </executions>

-        <configuration>

-          <consoleOutput>true</consoleOutput>

-          <excludes>

-            <exclude>LICENSE*</exclude>

-            <exclude>NOTICE*</exclude>

-            <exclude>README*</exclude>

-            <exclude>RELEASE_NOTES*</exclude>

-            <!-- Modules which are excluded from the build -->

-            <!-- FlashBuilder settings. frameworks/fb.properties contains Alex' path entries and should be removed -->

-            <exclude>fb.properties</exclude>

-            <!-- FlashBuilder / Eclipse settings. If checked in, they should have apache headers -->

-            <exclude>**/.settings/**</exclude>

-            <exclude>**/*.classpath</exclude>

-            <exclude>**/*.project</exclude>

-            <!-- Ignore IntelliJ IDEA project files -->

-            <exclude>**/*.iml</exclude>

-            <exclude>**/.idea/**</exclude>

-            <!-- Ignore VSCode/Java project files -->

-            <exclude>**/.factorypath</exclude>

+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache</groupId>
+    <artifactId>apache</artifactId>
+    <version>23</version>
+  </parent>
+
+  <groupId>org.apache.royale.compiler</groupId>
+  <artifactId>royale-compiler-parent</artifactId>
+  <version>0.9.8</version>
+  <packaging>pom</packaging>
+
+  <name>Apache Royale: Compiler: Parent</name>
+  <description>The Apache Royale Project</description>
+  
+  <scm>
+    <connection>scm:git:https://gitbox.apache.org/repos/asf/royale-compiler.git</connection>
+    <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/royale-compiler.git</developerConnection>
+    <url>https://github.com/apache/royale-compiler</url>
+    <tag>org.apache.royale.compiler-0.9.8-rc7</tag>
+  </scm>
+
+  <properties>
+    <java.version>1.8</java.version>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <project.reporting.outputencoding>UTF-8</project.reporting.outputencoding>
+    <maven.version>3.3.1</maven.version>
+
+    <compiler-build-tools.version>1.2.1</compiler-build-tools.version>
+    <compiler-jburg-types.version>1.1.0</compiler-jburg-types.version>
+
+    <flex.version>4.15.0</flex.version>
+    <flash.version>20.0</flash.version>
+    <air.version>20.0</air.version>
+    <option.withSwf.enabled>false</option.withSwf.enabled>
+
+    <release-profiles>apache-release,option-with-swf</release-profiles>
+
+    <!-- Dont't open multiple connections to one service to upload multiple artifacts at the same time -->
+    <maven.wagon.httpconnectionManager.maxPerRoute>1</maven.wagon.httpconnectionManager.maxPerRoute>
+    <!-- Dont't open multiple connections in total to upload multiple artifacts at the same time -->
+    <maven.wagon.httpconnectionManager.maxTotal>1</maven.wagon.httpconnectionManager.maxTotal>
+    <!-- Change the retry handler to a version that supports retries -->
+    <maven.wagon.http.retryHandler.class>standard</maven.wagon.http.retryHandler.class>
+    <!-- Try at most 6 times to deploy every artifact -->
+    <maven.wagon.http.retryHandler.count>6</maven.wagon.http.retryHandler.count>
+    <project.build.outputTimestamp>2021-08-27T11:57:25Z</project.build.outputTimestamp>
+  </properties>
+
+  <!-- Only configure the site distribution as the rest is handled by the apache parent -->
+  <distributionManagement>
+    <site>
+      <id>apache.website</id>
+      <url>scm:git:https://gitbox.apache.org/repos/asf/royale-compiler.git</url>
+    </site>
+  </distributionManagement>
+
+  <issueManagement>
+    <system>GitHub</system>
+    <url>https://github.com/apache/royale-compiler/issues</url>
+  </issueManagement>
+
+  <mailingLists>
+    <mailingList>
+      <name>Apache Royale User List</name>
+      <subscribe>users-subscribe@royale.apache.org</subscribe>
+      <unsubscribe>users-unsubscribe@royale.apache.org</unsubscribe>
+      <post>users@royale.apache.org</post>
+      <archive>http://mail-archives.apache.org/mod_mbox/royale-users/</archive>
+    </mailingList>
+    <mailingList>
+      <name>Apache Royale Developer List</name>
+      <subscribe>dev-subscribe@royale.apache.org</subscribe>
+      <unsubscribe>dev-unsubscribe@royale.apache.org</unsubscribe>
+      <post>dev@royale.apache.org</post>
+      <archive>http://mail-archives.apache.org/mod_mbox/royale-dev/</archive>
+    </mailingList>
+  </mailingLists>
+
+  <modules>
+    <module>compiler-common</module>
+    <module>compiler-externc</module>
+    <module>compiler-playerglobalc</module>
+    <module>compiler</module>
+    <module>compiler-jx</module>
+    <module>compiler-test-utils</module>
+    <module>swfutils</module>
+    <module>debugger</module>
+    <module>flex-compiler-oem</module>
+    <module>royale-ant-tasks</module>
+    <module>royaleunit-ant-tasks</module>
+    <!--<module>royale-maven-extension</module>-->
+    <module>royale-maven-plugin</module>
+  </modules>
+
+  <build>
+    <extensions>
+      <extension>
+        <groupId>org.apache.maven.wagon</groupId>
+        <artifactId>wagon-http</artifactId>
+        <version>3.4.0</version>
+      </extension>
+    </extensions>
+
+    <plugins>
+      <!-- Execute some checks if the environment ist correctly configured -->
+      <plugin>
+        <groupId>org.codehaus.gmaven</groupId>
+        <artifactId>groovy-maven-plugin</artifactId>
+        <executions>
+          <!-- Do some pre-build checks and report any findings to the user -->
+          <execution>
+            <id>prerequisite-check</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>execute</goal>
+            </goals>
+            <inherited>false</inherited>
+            <configuration>
+              <source>${project.basedir}/src/main/script/prerequisiteCheck.groovy</source>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+
+      <!-- Check if all source files have the required apache license headers -->
+      <plugin>
+        <groupId>org.apache.rat</groupId>
+        <artifactId>apache-rat-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>license-check</id>
+            <phase>verify</phase>
+            <goals>
+              <goal>check</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <consoleOutput>true</consoleOutput>
+          <excludes>
+            <exclude>LICENSE*</exclude>
+            <exclude>NOTICE*</exclude>
+            <exclude>README*</exclude>
+            <exclude>**/RELEASE_NOTES*</exclude>
+            <!-- Modules which are excluded from the build -->
+            <!-- FlashBuilder settings. frameworks/fb.properties contains Alex' path entries and should be removed -->
+            <exclude>fb.properties</exclude>
+            <!-- FlashBuilder / Eclipse settings. If checked in, they should have apache headers -->
+            <exclude>**/.settings/**</exclude>
+            <exclude>**/*.classpath</exclude>
+            <exclude>**/*.project</exclude>
+            <!-- Ignore IntelliJ IDEA project files -->
+            <exclude>**/*.iml</exclude>
+            <exclude>**/.idea/**</exclude>
+            <!-- Ignore VSCode/Java project files -->
+            <exclude>**/.factorypath</exclude>
             <!--
                 Exclude any eventually existing content of target directories.
                 Some times when building with a bigger maven reactor and then
                 with a smaller one, RAT will complain about stuff still in the
                 target directories. We don't want that.
-            -->

-            <exclude>**/target/**</exclude>

-            <exclude>**/release-dir/**</exclude>

-            <!-- Stuff an Ant build might have left behind. -->

-            <exclude>lib/**</exclude>

+            -->
+            <exclude>**/target/**</exclude>
+            <exclude>**/release-dir/**</exclude>
+            <!-- Stuff an Ant build might have left behind. -->
+            <exclude>lib/**</exclude>
             <!--
                 In case of an ANT based release the typedefs are included as a
                 subdirectory. We need to exclude this directory from the compiler checks
                 as the typedefs build will handle all content in that directory
-            -->

-            <exclude>royale-typedefs/**</exclude>

+            -->
+            <exclude>royale-typedefs/**</exclude>
             <!-- This file is used to get reproducible builds.  See royale-maven-plugin/pom.xml
                  for more info.
-             -->

-            <exclude>**/src/main/sisu/javax.inject.Named</exclude>

-          </excludes>

-        </configuration>

-      </plugin>

-

-      <plugin>

-        <groupId>net.sourceforge.jburg</groupId>

-        <artifactId>jburg-maven-plugin</artifactId>

-        <dependencies>

-          <dependency>

-            <groupId>org.apache.royale.compiler</groupId>

-            <artifactId>compiler-jburg-types</artifactId>

-            <version>${compiler-jburg-types.version}</version>

-          </dependency>

-        </dependencies>

-      </plugin>

-

-      <plugin>

-        <groupId>org.apache.maven.plugins</groupId>

-        <artifactId>maven-release-plugin</artifactId>

-        <configuration>

-          <arguments combine.self="override">-P${release-profiles}</arguments>

-        </configuration>

-      </plugin>

-

-      <plugin>

-        <groupId>org.apache.maven.plugins</groupId>

-        <artifactId>maven-compiler-plugin</artifactId>

-        <configuration>

-          <source>${java.version}</source>

-          <target>${java.version}</target>

-        </configuration>

-      </plugin>

-

-      <plugin>

-        <groupId>org.jacoco</groupId>

-        <artifactId>jacoco-maven-plugin</artifactId>

-        <executions>

+             -->
+            <exclude>**/src/main/sisu/javax.inject.Named</exclude>
+          </excludes>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <groupId>net.sourceforge.jburg</groupId>
+        <artifactId>jburg-maven-plugin</artifactId>
+        <dependencies>
+          <dependency>
+            <groupId>org.apache.royale.compiler</groupId>
+            <artifactId>compiler-jburg-types</artifactId>
+            <version>${compiler-jburg-types.version}</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-release-plugin</artifactId>
+        <configuration>
+          <arguments combine.self="override">-P${release-profiles}</arguments>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>${java.version}</source>
+          <target>${java.version}</target>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <groupId>org.jacoco</groupId>
+        <artifactId>jacoco-maven-plugin</artifactId>
+        <executions>
           <!--
               Prepares the property pointing to the JaCoCo runtime agent which
               is passed as VM argument when Maven the Surefire plugin is executed.
-          -->

-          <execution>

-            <id>pre-unit-test</id>

-            <goals>

-              <goal>prepare-agent</goal>

-            </goals>

-            <configuration>

-              <!-- Sets the path to the file which contains the execution data. -->

-              <destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>

+          -->
+          <execution>
+            <id>pre-unit-test</id>
+            <goals>
+              <goal>prepare-agent</goal>
+            </goals>
+            <configuration>
+              <!-- Sets the path to the file which contains the execution data. -->
+              <destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>
               <!--
                   Sets the name of the property containing the settings
                   for JaCoCo runtime agent.
-              -->

-              <propertyName>surefireArgLine</propertyName>

-            </configuration>

-          </execution>

+              -->
+              <propertyName>surefireArgLine</propertyName>
+            </configuration>
+          </execution>
           <!--
               Prepares the property pointing to the JaCoCo runtime agent which
               is passed as VM argument when Maven the Failsafe plugin is executed.
-          -->

-          <execution>

-            <id>pre-integration-test</id>

-            <phase>pre-integration-test</phase>

-            <goals>

-              <goal>prepare-agent</goal>

-            </goals>

-            <configuration>

-              <!-- Sets the path to the file which contains the execution data. -->

-              <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>

+          -->
+          <execution>
+            <id>pre-integration-test</id>
+            <phase>pre-integration-test</phase>
+            <goals>
+              <goal>prepare-agent</goal>
+            </goals>
+            <configuration>
+              <!-- Sets the path to the file which contains the execution data. -->
+              <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
               <!--
                   Sets the name of the property containing the settings
                   for JaCoCo runtime agent.
-              -->

-              <propertyName>failsafeArgLine</propertyName>

-            </configuration>

-          </execution>

-        </executions>

-      </plugin>

-

-      <!-- Make the surefire execute all unit-tests -->

-      <plugin>

-        <groupId>org.apache.maven.plugins</groupId>

-        <artifactId>maven-surefire-plugin</artifactId>

-        <configuration>

-          <!-- the @-sign implies late-evaluation of the property -->

-          <argLine>@{surefireArgLine}</argLine>

-          <systemPropertyVariables>

-            <buildType>Maven</buildType>

-            <flexVersion>${flex.version}</flexVersion>

-            <flashVersion>${flash.version}</flashVersion>

-            <airVersion>${air.version}</airVersion>

-            <mavenLocalRepoDir>${settings.localRepository}</mavenLocalRepoDir>

-            <optionWithSwfEnabled>${option.withSwf.enabled}</optionWithSwfEnabled>

-          </systemPropertyVariables>

+              -->
+              <propertyName>failsafeArgLine</propertyName>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+
+      <!-- Make the surefire execute all unit-tests -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <!-- the @-sign implies late-evaluation of the property -->
+          <argLine>@{surefireArgLine}</argLine>
+          <systemPropertyVariables>
+            <buildType>Maven</buildType>
+            <flexVersion>${flex.version}</flexVersion>
+            <flashVersion>${flash.version}</flashVersion>
+            <airVersion>${air.version}</airVersion>
+            <mavenLocalRepoDir>${settings.localRepository}</mavenLocalRepoDir>
+            <optionWithSwfEnabled>${option.withSwf.enabled}</optionWithSwfEnabled>
+          </systemPropertyVariables>
           <!--
               Currently some tests need this to be disabled,
               but actually this is a bug. For now I'll disable
               them to avoid problems during the maven migration.
               After this is finished, we should definitely fix
               the tests so assertions can be enabled.
-          -->

-          <enableAssertions>false</enableAssertions>

-        </configuration>

-      </plugin>

-

-      <!-- Make the failsafe execute all integration-tests -->

-      <plugin>

-        <groupId>org.apache.maven.plugins</groupId>

-        <artifactId>maven-failsafe-plugin</artifactId>

-        <executions>

-          <execution>

-            <goals>

-              <goal>integration-test</goal>

-              <goal>verify</goal>

-            </goals>

-          </execution>

-        </executions>

-        <configuration>

-          <!-- the @-sign implies late-evaluation of the property -->

-          <argLine>@{failsafeArgLine}</argLine>

-          <systemPropertyVariables>

-            <buildType>Maven</buildType>

-            <flexVersion>${flex.version}</flexVersion>

-            <flashVersion>${flash.version}</flashVersion>

-            <airVersion>${air.version}</airVersion>

-            <mavenLocalRepoDir>${settings.localRepository}</mavenLocalRepoDir>

-            <FLASHPLAYER_DEBUGGER>${env.FLASHPLAYER_DEBUGGER}</FLASHPLAYER_DEBUGGER>

-          </systemPropertyVariables>

-        </configuration>

-      </plugin>

-

-      <plugin>

-        <groupId>org.apache.maven.plugins</groupId>

-        <artifactId>maven-dependency-plugin</artifactId>

-        <executions>

-          <execution>

-            <id>analyze</id>

-            <goals>

-              <goal>analyze-only</goal>

-            </goals>

-            <configuration>

-              <failOnWarning>false</failOnWarning>

-            </configuration>

-          </execution>

-        </executions>

-      </plugin>

-

-      <!-- This plugin cleans up the jars for anything that might cause problems for reproducible builds -->

-      <!--
-        Even if the core maven plugins currently would support doing this without, we would be required
-        to set the line-separator and the Antlr3 plugin crashes if this is set to something non-default
-      -->

-      <plugin>

-        <groupId>io.github.zlika</groupId>

-        <artifactId>reproducible-build-maven-plugin</artifactId>

-        <version>0.11</version>

-        <executions>

-          <execution>

-            <goals>

-              <goal>strip-jar</goal>

-            </goals>

-          </execution>

-        </executions>

-      </plugin>

-

-      <!-- Plugin to detect problems with JDK incompatibilities -->

-      <plugin>

-        <groupId>org.codehaus.mojo</groupId>

-        <artifactId>animal-sniffer-maven-plugin</artifactId>

-        <executions>

-          <execution>

-            <id>check-jdk-1.8</id>

-            <phase>test</phase>

-            <goals>

-              <goal>check</goal>

-            </goals>

-            <configuration>

-              <signature>

-                <groupId>org.codehaus.mojo.signature</groupId>

-                <artifactId>java18</artifactId>

-                <version>1.0</version>

-              </signature>

-            </configuration>

-          </execution>

-        </executions>

-      </plugin>

-    </plugins>

-

-    <pluginManagement>

-      <plugins>

-        <plugin>

-          <groupId>org.apache.royale.compiler</groupId>

-          <artifactId>compiler-build-tools</artifactId>

-          <version>${compiler-build-tools.version}</version>

-        </plugin>

-

-        <plugin>

-          <groupId>com.googlecode.maven-download-plugin</groupId>

-          <artifactId>download-maven-plugin</artifactId>

-          <version>1.5.0</version>

-        </plugin>

-

-        <plugin>

-          <groupId>org.apache.rat</groupId>

-          <artifactId>apache-rat-plugin</artifactId>

-          <version>0.13</version>

-        </plugin>

-

-        <plugin>

-          <groupId>org.codehaus.mojo</groupId>

-          <artifactId>exec-maven-plugin</artifactId>

-          <version>1.6.0</version>

-        </plugin>

-

-        <plugin>

-          <groupId>org.apache.maven.plugins</groupId>

-          <artifactId>maven-resources-plugin</artifactId>

-          <version>3.1.0</version>

-        </plugin>

-

-        <plugin>

-          <groupId>net.sourceforge.jburg</groupId>

-          <artifactId>jburg-maven-plugin</artifactId>

-          <version>1.10.4</version>

-        </plugin>

-

-        <plugin>

-          <groupId>de.jflex</groupId>

-          <artifactId>maven-jflex-plugin</artifactId>

-          <version>1.4.3</version>

-        </plugin>

-

-        <plugin>

-          <groupId>org.apache.maven.plugins</groupId>

-          <artifactId>maven-antlr-plugin</artifactId>

-          <version>2.0-beta-1</version>

-        </plugin>

-

-        <plugin>

-          <groupId>org.antlr</groupId>

-          <artifactId>antlr3-maven-plugin</artifactId>

-          <version>3.5.2</version>

-        </plugin>

-

-        <plugin>

-          <groupId>org.apache.maven.plugins</groupId>

-          <artifactId>maven-compiler-plugin</artifactId>

-          <version>3.8.1</version>

-        </plugin>

-

-        <plugin>

-          <groupId>org.codehaus.gmaven</groupId>

-          <artifactId>groovy-maven-plugin</artifactId>

-          <version>2.1.1</version>

-        </plugin>

-

-        <plugin>

-          <groupId>org.apache.maven.plugins</groupId>

-          <artifactId>maven-dependency-plugin</artifactId>

-          <version>3.1.1</version>

-        </plugin>

-

-        <plugin>

-          <groupId>org.apache.maven.plugins</groupId>

-          <artifactId>maven-deploy-plugin</artifactId>

-          <version>2.8.2</version>

-          <!-- If deploying fails due to repo or network problems, retry the given number of times (1-10) -->

-          <configuration>

-            <retryFailedDeploymentCount>6</retryFailedDeploymentCount>

-          </configuration>

-        </plugin>

-

-        <plugin>

-          <groupId>org.jacoco</groupId>

-          <artifactId>jacoco-maven-plugin</artifactId>

-          <version>0.8.5</version>

-        </plugin>

-

-        <!-- Update to a version able to do reproducible builds -->

-        <plugin>

-          <groupId>org.apache.maven.plugins</groupId>

-          <artifactId>maven-jar-plugin</artifactId>

-          <configuration>

-            <archive>

-              <manifest>

-                <!-- <addClasspath>true</addClasspath> -->

-                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>

-                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>

-              </manifest>

-            </archive>

-          </configuration>

-        </plugin>

-

-        <plugin>

-          <groupId>org.apache.maven.plugins</groupId>

-          <artifactId>maven-archiver-plugin</artifactId>

-          <version>3.0.1</version>

-        </plugin>

-

-        <plugin>

-          <groupId>org.apache.maven.plugins</groupId>

-          <artifactId>maven-surefire-plugin</artifactId>

-          <version>2.22.1</version>

-        </plugin>

-

-        <plugin>

-          <groupId>org.apache.maven.plugins</groupId>

-          <artifactId>maven-failsafe-plugin</artifactId>

-          <version>2.22.1</version>

-        </plugin>

-

-        <!-- Update to a version able to do reproducible builds -->

-        <plugin>

-          <groupId>org.apache.maven.plugins</groupId>

-          <artifactId>maven-source-plugin</artifactId>

-          <version>3.2.0</version>

-        </plugin>

-

-        <!-- Update to a version able to do reproducible builds -->

-        <plugin>

-          <groupId>org.apache.maven.plugins</groupId>

-          <artifactId>maven-assembly-plugin</artifactId>

-          <version>3.2.0</version>

-        </plugin>

-

-        <plugin>

-          <groupId>org.codehaus.mojo</groupId>

-          <artifactId>animal-sniffer-maven-plugin</artifactId>

-          <version>1.18</version>

-        </plugin>

-

-        <plugin>

-          <groupId>org.apache.maven.plugins</groupId>

-          <artifactId>maven-javadoc-plugin</artifactId>

-          <version>3.1.1</version>

-          <configuration>

-            <tags>

-              <tag>

-                <name>goal</name>

-                <placement>a</placement>

-                <head>Goal:</head>

-              </tag>

-              <tag>

-                <name>phase</name>

-                <placement>a</placement>

-                <head>Phase:</head>

-              </tag>

-              <tag>

-                <name>threadSafe</name>

-                <placement>a</placement>

-                <head>Thread Safe:</head>

-              </tag>

-              <tag>

-                <name>requiresDependencyResolution</name>

-                <placement>a</placement>

-                <head>Requires Dependency Resolution:</head>

-              </tag>

-              <tag>

-                <name>requiresProject</name>

-                <placement>a</placement>

-                <head>Requires Project:</head>

-              </tag>

-            </tags>

-            <!-- TODO: This should only be a measure of last resort -->

-            <failOnError>false</failOnError>

-          </configuration>

-        </plugin>

-

-        <plugin>

-          <groupId>org.apache.maven.plugins</groupId>

-          <artifactId>maven-scm-plugin</artifactId>

-          <version>1.10.0</version>

-        </plugin>

-

-        <plugin>

-          <groupId>org.apache.maven.plugins</groupId>

-          <artifactId>maven-site-plugin</artifactId>

-          <version>3.8.2</version>

-        </plugin>

-

-        <plugin>

-          <groupId>org.apache.maven.plugins</groupId>

-          <artifactId>maven-scm-publish-plugin</artifactId>

-          <version>3.0.0</version>

-        </plugin>

-

-        <plugin>

-          <groupId>org.apache.maven.plugins</groupId>

-          <artifactId>maven-release-plugin</artifactId>

-          <version>3.0.0-M1</version>

-        </plugin>

-

-        <plugin>

-          <groupId>com.theoryinpractise</groupId>

-          <artifactId>reproducible-maven-plugin</artifactId>

-          <version>1.0.1</version>

-        </plugin>

-      </plugins>

-    </pluginManagement>

-  </build>

-

-  <profiles>

-    <profile>

-      <id>option-with-swf</id>

-      <properties>

-        <option.withSwf.enabled>true</option.withSwf.enabled>

-      </properties>

-    </profile>

-

-    <!-- Profile for linux (Self-Enabling) -->

-    <profile>

-      <id>_os-unix</id>

-      <activation>

-        <os>

-          <family>unix</family>

-        </os>

-      </activation>

-      <properties>

-        <os.type>linux</os.type>

-      </properties>

-    </profile>

-

-    <!-- Profile for mac (Self-Enabling) -->

-    <profile>

-      <id>_os-mac</id>

-      <activation>

-        <os>

-          <family>mac</family>

-        </os>

-      </activation>

-      <properties>

-        <os.type>mac</os.type>

-      </properties>

-    </profile>

-

-    <!-- profile for windows (Self-Enabling) -->

-    <profile>

-      <id>_os-windows</id>

-      <activation>

-        <os>

-          <family>windows</family>

-        </os>

-      </activation>

-      <properties>

-        <os.type>win</os.type>

-      </properties>

-    </profile>

-

-    <profile>

+          -->
+          <enableAssertions>false</enableAssertions>
+        </configuration>
+      </plugin>
+
+      <!-- Make the failsafe execute all integration-tests -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-failsafe-plugin</artifactId>
+        <executions>
+          <execution>
+            <goals>
+              <goal>integration-test</goal>
+              <goal>verify</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <!-- the @-sign implies late-evaluation of the property -->
+          <argLine>@{failsafeArgLine}</argLine>
+          <systemPropertyVariables>
+            <buildType>Maven</buildType>
+            <flexVersion>${flex.version}</flexVersion>
+            <flashVersion>${flash.version}</flashVersion>
+            <airVersion>${air.version}</airVersion>
+            <mavenLocalRepoDir>${settings.localRepository}</mavenLocalRepoDir>
+            <FLASHPLAYER_DEBUGGER>${env.FLASHPLAYER_DEBUGGER}</FLASHPLAYER_DEBUGGER>
+          </systemPropertyVariables>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>analyze</id>
+            <goals>
+              <goal>analyze-only</goal>
+            </goals>
+            <configuration>
+              <failOnWarning>false</failOnWarning>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+
+      <!-- Plugin to detect problems with JDK incompatibilities -->
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>animal-sniffer-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>check-jdk-1.8</id>
+            <phase>test</phase>
+            <goals>
+              <goal>check</goal>
+            </goals>
+            <configuration>
+              <signature>
+                <groupId>org.codehaus.mojo.signature</groupId>
+                <artifactId>java18</artifactId>
+                <version>1.0</version>
+              </signature>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.royale.compiler</groupId>
+          <artifactId>compiler-build-tools</artifactId>
+          <version>${compiler-build-tools.version}</version>
+        </plugin>
+
+        <plugin>
+          <groupId>com.googlecode.maven-download-plugin</groupId>
+          <artifactId>download-maven-plugin</artifactId>
+          <version>1.5.0</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.rat</groupId>
+          <artifactId>apache-rat-plugin</artifactId>
+          <version>0.13</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>exec-maven-plugin</artifactId>
+          <version>1.6.0</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-resources-plugin</artifactId>
+          <version>3.1.0</version>
+        </plugin>
+
+        <plugin>
+          <groupId>net.sourceforge.jburg</groupId>
+          <artifactId>jburg-maven-plugin</artifactId>
+          <version>1.10.4</version>
+        </plugin>
+
+        <plugin>
+          <groupId>de.jflex</groupId>
+          <artifactId>maven-jflex-plugin</artifactId>
+          <version>1.4.3</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-antlr-plugin</artifactId>
+          <version>2.0-beta-1</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.antlr</groupId>
+          <artifactId>antlr3-maven-plugin</artifactId>
+          <version>3.5.2</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <version>3.8.1</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.codehaus.gmaven</groupId>
+          <artifactId>groovy-maven-plugin</artifactId>
+          <version>2.1.1</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-dependency-plugin</artifactId>
+          <version>3.1.1</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-deploy-plugin</artifactId>
+          <version>2.8.2</version>
+          <!-- If deploying fails due to repo or network problems, retry the given number of times (1-10) -->
+          <configuration>
+            <retryFailedDeploymentCount>6</retryFailedDeploymentCount>
+          </configuration>
+        </plugin>
+
+        <plugin>
+          <groupId>org.jacoco</groupId>
+          <artifactId>jacoco-maven-plugin</artifactId>
+          <version>0.8.5</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-jar-plugin</artifactId>
+          <configuration>
+            <archive>
+              <manifest>
+                <!-- <addClasspath>true</addClasspath> -->
+                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
+                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+              </manifest>
+            </archive>
+          </configuration>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-archiver-plugin</artifactId>
+          <version>3.0.1</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <version>2.22.1</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-failsafe-plugin</artifactId>
+          <version>2.22.1</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-source-plugin</artifactId>
+          <version>3.2.1</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-assembly-plugin</artifactId>
+          <version>3.2.0</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>animal-sniffer-maven-plugin</artifactId>
+          <version>1.18</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-javadoc-plugin</artifactId>
+          <version>3.2.0</version>
+          <configuration>
+            <tags>
+              <tag>
+                <name>goal</name>
+                <placement>a</placement>
+                <head>Goal:</head>
+              </tag>
+              <tag>
+                <name>phase</name>
+                <placement>a</placement>
+                <head>Phase:</head>
+              </tag>
+              <tag>
+                <name>threadSafe</name>
+                <placement>a</placement>
+                <head>Thread Safe:</head>
+              </tag>
+              <tag>
+                <name>requiresDependencyResolution</name>
+                <placement>a</placement>
+                <head>Requires Dependency Resolution:</head>
+              </tag>
+              <tag>
+                <name>requiresProject</name>
+                <placement>a</placement>
+                <head>Requires Project:</head>
+              </tag>
+            </tags>
+            <!-- TODO: This should only be a measure of last resort -->
+            <failOnError>false</failOnError>
+          </configuration>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-scm-plugin</artifactId>
+          <version>1.10.0</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-site-plugin</artifactId>
+          <version>3.8.2</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-scm-publish-plugin</artifactId>
+          <version>3.0.0</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-release-plugin</artifactId>
+          <version>3.0.0-M1</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+
+  <profiles>
+    <profile>
+      <id>option-with-swf</id>
+      <properties>
+        <option.withSwf.enabled>true</option.withSwf.enabled>
+      </properties>
+    </profile>
+
+    <!-- Profile for linux (Self-Enabling) -->
+    <profile>
+      <id>_os-unix</id>
+      <activation>
+        <os>
+          <family>unix</family>
+        </os>
+      </activation>
+      <properties>
+        <os.type>linux</os.type>
+      </properties>
+    </profile>
+
+    <!-- Profile for mac (Self-Enabling) -->
+    <profile>
+      <id>_os-mac</id>
+      <activation>
+        <os>
+          <family>mac</family>
+        </os>
+      </activation>
+      <properties>
+        <os.type>mac</os.type>
+      </properties>
+    </profile>
+
+    <!-- profile for windows (Self-Enabling) -->
+    <profile>
+      <id>_os-windows</id>
+      <activation>
+        <os>
+          <family>windows</family>
+        </os>
+      </activation>
+      <properties>
+        <os.type>win</os.type>
+      </properties>
+    </profile>
+
+    <profile>
       <!-- This profile is used to test against staged release artifacts.
            Be sure to clear out artifacts in the local repository before
-           and after using -->

-      <id>staged-releases</id>

-      <pluginRepositories>

-        <pluginRepository>

-          <id>staged-releases</id>

-          <url>https://repository.apache.org/content/repositories/orgapacheroyale-${maven.folder.number}</url>

-        </pluginRepository>

-      </pluginRepositories>

-    </profile>

-

+           and after using -->
+      <id>staged-releases</id>
+      <pluginRepositories>
+        <pluginRepository>
+          <id>staged-releases</id>
+          <url>https://repository.apache.org/content/repositories/orgapacheroyale-${maven.folder.number}</url>
+        </pluginRepository>
+      </pluginRepositories>
+    </profile>
+
     <!--
       This profile enables the changes required to do releases on the Royale CI server.
       It should not be used otherwise.
-    -->

-    <profile>

-      <id>royale-release</id>

-      <properties>

-        <!-- Ensure the royale-release plugin is enabled when running release:perform -->

-        <release-profiles>apache-release,royale-release,option-with-swf</release-profiles>

-      </properties>

-

-      <!-- Redirect the deployment to a local directory -->

-      <!-- Note: using the 'altReleaseDeploymentRepository' and alike were ignored in the release:perform phase -->

-      <distributionManagement>

-        <repository>

-          <id>apache.releases.https</id>

-          <name>Apache Release Distribution Repository</name>

+    -->
+    <profile>
+      <id>royale-release</id>
+      <properties>
+        <!-- Ensure the royale-release plugin is enabled when running release:perform -->
+        <release-profiles>apache-release,royale-release,option-with-swf</release-profiles>
+      </properties>
+
+      <!-- Redirect the deployment to a local directory -->
+      <!-- Note: using the 'altReleaseDeploymentRepository' and alike were ignored in the release:perform phase -->
+      <distributionManagement>
+        <repository>
+          <id>apache.releases.https</id>
+          <name>Apache Release Distribution Repository</name>
           <!--
             'maven.multiModuleProjectDirectory' is a property introduced with maven 3.3.1 ...
             don't worry if your IDE is complaining.
             Also this will be set to the 'target/checkout' directory the output will be in
             'target/local-release-dir'.
-          -->

-          <url>file://${maven.multiModuleProjectDirectory}/../local-release-dir</url>

-        </repository>

-      </distributionManagement>

-

-      <build>

-        <plugins>

-          <!-- Generate the effective poms for this build -->

-          <plugin>

-            <groupId>org.apache.maven.plugins</groupId>

-            <artifactId>maven-help-plugin</artifactId>

-            <executions>

-              <execution>

-                <id>generate-effective-pom</id>

-                <phase>compile</phase>

-                <goals>

-                  <goal>effective-pom</goal>

-                </goals>

-                <configuration>

-                  <output>${project.build.directory}/effective.pom</output>

-                </configuration>

-              </execution>

-            </executions>

-          </plugin>

-        </plugins>

-        <pluginManagement>

-          <plugins>

-            <!-- We require the release manager to manually login an sign using his credentials -->

-            <plugin>

-              <groupId>org.apache.maven.plugins</groupId>

-              <artifactId>maven-gpg-plugin</artifactId>

-              <configuration>

-                <skip>true</skip>

-              </configuration>

-            </plugin>

-            <!-- We require the release manager to login and push the changes using his credentials -->

-            <plugin>

-              <groupId>org.apache.maven.plugins</groupId>

-              <artifactId>maven-release-plugin</artifactId>

-              <configuration>

-                <pushChanges>false</pushChanges>

-                <providerImplementations>

-                  <git>jgit</git>

-                </providerImplementations>

-              </configuration>

-              <dependencies>

-                <dependency>

-                  <groupId>org.apache.maven.scm</groupId>

-                  <artifactId>maven-scm-provider-jgit</artifactId>

-                  <version>1.11.3-SNAPSHOT</version>

-                </dependency>

-              </dependencies>

-            </plugin>

-          </plugins>

-        </pluginManagement>

-      </build>

-    </profile>

-

-    <!-- Make the release-plugin use the new reproducible build plugin extension -->

-    <profile>

-      <id>apache-release</id>

-      <build>

-        <plugins>

-          <plugin>

-            <groupId>com.theoryinpractise</groupId>

-            <artifactId>reproducible-maven-plugin</artifactId>

-          </plugin>

-          <plugin>

-            <groupId>org.apache.maven.plugins</groupId>

-            <artifactId>maven-release-plugin</artifactId>

-            <configuration>

-              <preparationGoals>clean com.theoryinpractise:reproducible-maven-plugin:apply install</preparationGoals>

-              <completionGoals>com.theoryinpractise:reproducible-maven-plugin:clear</completionGoals>

-            </configuration>

-          </plugin>

-          <!--
-            Create MD5 and SHA512 checksum files for the release artifacts.
-          -->

-          <plugin>

-            <groupId>net.nicoulaj.maven.plugins</groupId>

-            <artifactId>checksum-maven-plugin</artifactId>

-            <version>1.8</version>

-            <executions>

-              <execution>

-                <goals>

-                  <goal>files</goal>

-                </goals>

-              </execution>

-            </executions>

-            <configuration>

-              <algorithms>

-                <algorithm>SHA-512</algorithm>

-              </algorithms>

-              <fileSets>

-                <fileSet>

-                  <directory>${project.build.directory}</directory>

-                  <includes>

-                    <include>royale-compiler-parent-${project.version}-source-release.zip</include>

-                  </includes>

-                </fileSet>

-              </fileSets>

-            </configuration>

-          </plugin>

-        </plugins>

-      </build>

-    </profile>

-

+          -->
+          <url>file://${maven.multiModuleProjectDirectory}/../local-release-dir</url>
+        </repository>
+      </distributionManagement>
+
+      <build>
+        <plugins>
+          <!-- Generate the effective poms for this build -->
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-help-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>generate-effective-pom</id>
+                <phase>compile</phase>
+                <goals>
+                  <goal>effective-pom</goal>
+                </goals>
+                <configuration>
+                  <output>${project.build.directory}/effective.pom</output>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+        <pluginManagement>
+          <plugins>
+            <!-- We require the release manager to manually login an sign using his credentials -->
+            <plugin>
+              <groupId>org.apache.maven.plugins</groupId>
+              <artifactId>maven-gpg-plugin</artifactId>
+              <configuration>
+                <skip>true</skip>
+              </configuration>
+            </plugin>
+            <!-- We require the release manager to login and push the changes using his credentials -->
+            <plugin>
+              <groupId>org.apache.maven.plugins</groupId>
+              <artifactId>maven-release-plugin</artifactId>
+              <configuration>
+                <pushChanges>false</pushChanges>
+                <providerImplementations>
+                  <git>jgit</git>
+                </providerImplementations>
+              </configuration>
+              <dependencies>
+                <dependency>
+                  <groupId>org.apache.maven.scm</groupId>
+                  <artifactId>maven-scm-provider-jgit</artifactId>
+                  <version>1.11.3-SNAPSHOT</version>
+                </dependency>
+              </dependencies>
+            </plugin>
+          </plugins>
+        </pluginManagement>
+      </build>
+    </profile>
+
+    <!-- Make the release-plugin use the new reproducible build plugin extension -->
+    <profile>
+      <id>apache-release</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>net.nicoulaj.maven.plugins</groupId>
+            <artifactId>checksum-maven-plugin</artifactId>
+            <version>1.8</version>
+            <executions>
+              <execution>
+                <goals>
+                  <goal>files</goal>
+                </goals>
+              </execution>
+            </executions>
+            <configuration>
+              <algorithms>
+                <algorithm>SHA-512</algorithm>
+              </algorithms>
+              <fileSets>
+                <fileSet>
+                  <directory>${project.build.directory}</directory>
+                  <includes>
+                    <include>royale-compiler-parent-${project.version}-source-release.zip</include>
+                  </includes>
+                </fileSet>
+              </fileSets>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+
     <!--
       This profile is intended to help when having problems with Maven.
       When enabled, it automatically generates an "effective.pom" in the target directory.
       This version is the fully expanded version where all inherited configuration is in
       place and all variables are resolved and profile configuration is included.
-    -->

-    <profile>

-      <id>debug-pom</id>

-      <build>

-        <plugins>

-          <plugin>

-            <groupId>org.apache.maven.plugins</groupId>

-            <artifactId>maven-help-plugin</artifactId>

-            <executions>

-              <execution>

-                <id>generate-effective-pom</id>

-                <phase>compile</phase>

-                <goals>

-                  <goal>effective-pom</goal>

-                </goals>

-                <configuration>

-                  <output>${project.build.directory}/effective.pom</output>

-                </configuration>

-              </execution>

-            </executions>

-          </plugin>

-        </plugins>

-      </build>

-    </profile>

-  </profiles>

-

-</project>

+    -->
+    <profile>
+      <id>debug-pom</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-help-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>generate-effective-pom</id>
+                <phase>compile</phase>
+                <goals>
+                  <goal>effective-pom</goal>
+                </goals>
+                <configuration>
+                  <output>${project.build.directory}/effective.pom</output>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+
+</project>
diff --git a/releasesteps.xml b/releasesteps.xml
index 1204030..b4752ba 100644
--- a/releasesteps.xml
+++ b/releasesteps.xml
@@ -295,12 +295,21 @@
         <antcall target="sign-jar-artifacts" >
             <param name="jarname" value="compiler" />
         </antcall>
+	<antcall target="sign-file" >
+		<param name="file" value="${artifactfolder}/artifacts/archive/target/local-release-dir/org/apache/royale/compiler/compiler/${release.version}/compiler-${release.version}-scripts.jar" />
+	</antcall>
         <antcall target="sign-jar-artifacts" >
             <param name="jarname" value="compiler-common" />
         </antcall>
         <antcall target="sign-jar-artifacts" >
             <param name="jarname" value="compiler-externc" />
         </antcall>
+	<antcall target="sign-jar-artifacts" >
+		<param name="jarname" value="compiler-playerglobalc" />
+	</antcall>
+	<antcall target="sign-file" >
+		<param name="file" value="${artifactfolder}/artifacts/archive/target/local-release-dir/org/apache/royale/compiler/compiler-playerglobalc/${release.version}/compiler-playerglobalc-${release.version}-tests.jar" />
+	</antcall>
         <antcall target="sign-file" >
             <param name="file" value="${artifactfolder}/artifacts/archive/target/local-release-dir/org/apache/royale/compiler/compiler-externc/${release.version}/compiler-externc-${release.version}-tests.jar" />
         </antcall>
@@ -386,7 +395,6 @@
             unless="release.version"/>
         <exec executable="${mvn}" failonerror="true" >
             <arg value="wagon:upload" />
-            <arg value="-X" />
             <arg value="-Dwagon.fromDir=${artifactfolder}/artifacts/archive/target/local-release-dir" />
             <arg value="-Dwagon.url=https://repository.apache.org/service/local/staging/deploy/maven2" />
             <arg value="-Dwagon.serverId=apache.releases.https" />
diff --git a/royale-ant-tasks/pom.xml b/royale-ant-tasks/pom.xml
index eeb4570..51d5412 100644
--- a/royale-ant-tasks/pom.xml
+++ b/royale-ant-tasks/pom.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>

+<?xml version="1.0" encoding="UTF-8"?>
 <!--
 
   Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,26 +16,43 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 
---><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

-  <modelVersion>4.0.0</modelVersion>

-

-  <parent>

-    <groupId>org.apache.royale.compiler</groupId>

-    <artifactId>royale-compiler-parent</artifactId>

-    <version>0.9.7</version>

-  </parent>

-

-  <artifactId>royale-ant-tasks</artifactId>

-  <version>0.9.7</version>

-

-  <name>Apache Royale: Royale Ant Tasks</name>

-

-  <dependencies>

-    <dependency>

-      <groupId>org.apache.ant</groupId>

-      <artifactId>ant</artifactId>

-      <version>1.7.0</version>

-    </dependency>

-  </dependencies>

-

-<properties><project.build.outputTimestamp>2020-05-07T15:02:12Z</project.build.outputTimestamp></properties></project>

+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.royale.compiler</groupId>
+    <artifactId>royale-compiler-parent</artifactId>
+    <version>0.9.8</version>
+  </parent>
+
+  <artifactId>royale-ant-tasks</artifactId>
+  <version>0.9.8</version>
+
+  <name>Apache Royale: Royale Ant Tasks</name>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifestEntries>
+              <!-- These paths are all defined the way the layout will be in the distribution -->
+              <Class-Path>jsc.jar ../../compiler/lib/compiler.jar ../../lib/compiler.jar</Class-Path>
+            </manifestEntries>
+          </archive>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.ant</groupId>
+      <artifactId>ant</artifactId>
+      <version>1.7.0</version>
+    </dependency>
+  </dependencies>
+
+<properties /></project>
diff --git a/royale-maven-plugin/pom.xml b/royale-maven-plugin/pom.xml
index e279cd4..3ab5d93 100644
--- a/royale-maven-plugin/pom.xml
+++ b/royale-maven-plugin/pom.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>

+<?xml version="1.0" encoding="UTF-8"?>
 <!--
 
   Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,119 +16,119 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 
---><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

-  <modelVersion>4.0.0</modelVersion>

-

-  <parent>

-    <groupId>org.apache.royale.compiler</groupId>

-    <artifactId>royale-compiler-parent</artifactId>

-    <version>0.9.7</version>

-  </parent>

-

-  <artifactId>royale-maven-plugin</artifactId>

-  <version>0.9.7</version>

-  <packaging>maven-plugin</packaging>

-

-  <name>Apache Royale: Royale Maven Plugin</name>

-

-  <properties>

-    <maven.version>3.3.1</maven.version>

-  <project.build.outputTimestamp>2020-05-07T15:02:12Z</project.build.outputTimestamp></properties>

-

-  <dependencies>

-    <dependency>

-      <groupId>javax.inject</groupId>

-      <artifactId>javax.inject</artifactId>

-      <version>1</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.maven</groupId>

-      <artifactId>maven-plugin-api</artifactId>

-      <version>${maven.version}</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.maven.plugin-tools</groupId>

-      <artifactId>maven-plugin-annotations</artifactId>

-      <version>3.4</version>

-      <scope>provided</scope>

-    </dependency>

-

-    <!-- Apache Velocity templating engine for generating config files -->

-    <dependency>

-      <groupId>org.apache.velocity</groupId>

-      <artifactId>velocity</artifactId>

-      <version>1.7</version>

-    </dependency>

-

-    <dependency>

-      <groupId>org.apache.maven</groupId>

-      <artifactId>maven-project</artifactId>

-      <version>2.2.1</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.maven</groupId>

-      <artifactId>maven-core</artifactId>

-      <version>${maven.version}</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.maven.shared</groupId>

-      <artifactId>file-management</artifactId>

-      <version>3.0.0</version>

-    </dependency>

-    <dependency>

-      <groupId>commons-io</groupId>

-      <artifactId>commons-io</artifactId>

-      <version>2.4</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.commons</groupId>

-      <artifactId>commons-lang3</artifactId>

-      <version>3.4</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.flex</groupId>

-      <artifactId>flex-tool-api</artifactId>

-      <version>1.0.0</version>

-    </dependency>

-  </dependencies>

-

-  <build>

-    <plugins>

-      <plugin>

-        <groupId>org.apache.maven.plugins</groupId>

-        <artifactId>maven-plugin-plugin</artifactId>

-        <version>3.6.0</version>

-        <configuration>

-          <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>

-        </configuration>

-        <executions>

-          <execution>

-            <id>mojo-descriptor</id>

-            <goals>

-              <goal>descriptor</goal>

-            </goals>

-          </execution>

-          <execution>

-            <id>help-goal</id>

-            <goals>

-              <goal>helpmojo</goal>

-            </goals>

-          </execution>

-        </executions>

-      </plugin>

-      <plugin>

-        <groupId>org.sonatype.plugins</groupId>

-        <artifactId>sisu-maven-plugin</artifactId>

-        <version>1.4</version>

-        <executions>

-          <execution>

-            <id>generate-index</id>

-            <goals>

-              <goal>main-index</goal>

-            </goals>

-          </execution>

-        </executions>

-      </plugin>

-    </plugins>

-  </build>

-</project>

+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.royale.compiler</groupId>
+    <artifactId>royale-compiler-parent</artifactId>
+    <version>0.9.8</version>
+  </parent>
+
+  <artifactId>royale-maven-plugin</artifactId>
+  <version>0.9.8</version>
+  <packaging>maven-plugin</packaging>
+
+  <name>Apache Royale: Royale Maven Plugin</name>
+
+  <properties>
+    <maven.version>3.3.1</maven.version>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>javax.inject</groupId>
+      <artifactId>javax.inject</artifactId>
+      <version>1</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+      <version>${maven.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.plugin-tools</groupId>
+      <artifactId>maven-plugin-annotations</artifactId>
+      <version>3.4</version>
+      <scope>provided</scope>
+    </dependency>
+
+    <!-- Apache Velocity templating engine for generating config files -->
+    <dependency>
+      <groupId>org.apache.velocity</groupId>
+      <artifactId>velocity</artifactId>
+      <version>1.7</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-project</artifactId>
+      <version>2.2.1</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-core</artifactId>
+      <version>${maven.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.shared</groupId>
+      <artifactId>file-management</artifactId>
+      <version>3.0.0</version>
+    </dependency>
+    <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
+      <version>2.4</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-lang3</artifactId>
+      <version>3.4</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.flex</groupId>
+      <artifactId>flex-tool-api</artifactId>
+      <version>1.0.0</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-plugin-plugin</artifactId>
+        <version>3.6.0</version>
+        <configuration>
+          <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
+        </configuration>
+        <executions>
+          <execution>
+            <id>mojo-descriptor</id>
+            <goals>
+              <goal>descriptor</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>help-goal</id>
+            <goals>
+              <goal>helpmojo</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.sonatype.plugins</groupId>
+        <artifactId>sisu-maven-plugin</artifactId>
+        <version>1.4</version>
+        <executions>
+          <execution>
+            <id>generate-index</id>
+            <goals>
+              <goal>main-index</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/royale-maven-plugin/src/main/java/org/apache/royale/maven/CompileASDocMojo.java b/royale-maven-plugin/src/main/java/org/apache/royale/maven/CompileASDocMojo.java
index b9424b9..297cd05 100644
--- a/royale-maven-plugin/src/main/java/org/apache/royale/maven/CompileASDocMojo.java
+++ b/royale-maven-plugin/src/main/java/org/apache/royale/maven/CompileASDocMojo.java
@@ -20,6 +20,7 @@
 package org.apache.royale.maven;
 
 import org.apache.flex.tools.FlexTool;
+import org.apache.maven.artifact.Artifact;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugins.annotations.LifecyclePhase;
 import org.apache.maven.plugins.annotations.Mojo;
@@ -159,6 +160,23 @@
         return defines;
     }
 
+    @Override
+    protected boolean includeLibrary(Artifact library) {
+        switch (type.get()) {
+            case SWF: {
+                String classifier = library.getClassifier();
+                return "swf".equalsIgnoreCase(classifier) ||
+                    ((classifier == null) && "runtime".equalsIgnoreCase(library.getScope()));
+            }
+            case JS: {
+                String classifier = library.getClassifier();
+                return "typedefs".equalsIgnoreCase(classifier) ||
+                    "js".equalsIgnoreCase(classifier);
+            }
+        }
+        return false;
+    }
+
     private enum Type {
         SWF,
         JS
diff --git a/royale-maven-plugin/src/main/java/org/apache/royale/maven/CompilePlayerglobalMojo.java b/royale-maven-plugin/src/main/java/org/apache/royale/maven/CompilePlayerglobalMojo.java
new file mode 100644
index 0000000..0233138
--- /dev/null
+++ b/royale-maven-plugin/src/main/java/org/apache/royale/maven/CompilePlayerglobalMojo.java
@@ -0,0 +1,115 @@
+/*
+ * 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.maven;
+
+import java.io.File;
+import java.util.List;
+
+import org.apache.flex.tools.FlexTool;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Component;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.project.MavenProjectHelper;
+
+/**
+ * goal which compiles a project into a playerglobal swc library.
+ */
+@Mojo(name="compile-playerglobal",defaultPhase = LifecyclePhase.PROCESS_SOURCES)
+public class CompilePlayerglobalMojo
+    extends BaseMojo
+{
+    @Parameter(defaultValue = "src/main/playerglobal")
+    private String playerglobalSourceDirectory;
+
+    @Parameter(defaultValue = "${project.artifactId}-${project.version}.swc")
+    protected String outputFileName;
+
+    @Parameter(defaultValue = "false")
+    private boolean skipPlayerglobal;
+
+    @Parameter(defaultValue = "false")
+    private boolean playerglobalAir;
+
+    @Component
+    private MavenProjectHelper projectHelper;
+
+    @Override
+    protected String getToolGroupName() {
+        return "Royale";
+    }
+
+    @Override
+    protected String getFlexTool() {
+        return FlexTool.FLEX_TOOL_COMPC;
+    }
+
+    @Override
+    protected String getConfigFileName() throws MojoExecutionException {
+        return "compile-playerglobal-config.xml";
+    }
+
+    protected File getOutput() throws MojoExecutionException {
+        return new File(outputDirectory, outputFileName);
+    }
+
+    @Override
+    protected List<String> getCompilerArgs(File configFile) throws MojoExecutionException {
+        List<String> args = super.getCompilerArgs(configFile);
+        args.add("-compiler.targets=SWF");
+        return args;
+    }
+
+    @Override
+    protected boolean skip() {
+        if(skipPlayerglobal) {
+            return true;
+        }
+        File inputFolder = new File(project.getBasedir(), playerglobalSourceDirectory);
+        return !inputFolder.exists() || !inputFolder.isDirectory();
+    }
+
+    @Override
+    public void execute() throws MojoExecutionException
+    {
+        super.execute();
+
+        if(getOutput().exists()) {
+            // Add the extern to the artifact.
+            projectHelper.attachArtifact(project, getOutput(), "swf");
+        }
+    }
+
+    @Override
+    protected List<Define> getDefines() throws MojoExecutionException {
+        List<Define> defines = super.getDefines();
+        defines.add(new Define("COMPILE::JS", "false"));
+        defines.add(new Define("COMPILE::SWF", "true"));
+        return defines;
+    }
+
+    @Override
+    protected boolean includeLibrary(Artifact library) {
+        return "typedefs".equalsIgnoreCase(library.getClassifier());
+    }
+
+}
diff --git a/royale-maven-plugin/src/main/java/org/apache/royale/maven/GeneratePlayerglobalMojo.java b/royale-maven-plugin/src/main/java/org/apache/royale/maven/GeneratePlayerglobalMojo.java
new file mode 100644
index 0000000..876c7d0
--- /dev/null
+++ b/royale-maven-plugin/src/main/java/org/apache/royale/maven/GeneratePlayerglobalMojo.java
@@ -0,0 +1,104 @@
+/*
+ * 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.maven;
+
+import java.io.File;
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.velocity.VelocityContext;
+
+/**
+ */
+@Mojo(name="generate-playerglobal",defaultPhase = LifecyclePhase.PROCESS_SOURCES)
+public class GeneratePlayerglobalMojo
+        extends BaseMojo
+{
+    @Parameter(defaultValue = "src/main/playerglobal")
+    private String playerglobalSourceDirectory;
+
+    @Parameter(defaultValue = "generated-sources/playerglobal")
+    private String outputDirectoryName;
+
+    @Parameter(defaultValue = "false")
+    private boolean skipPlayerglobal;
+
+    @Parameter(defaultValue = "false")
+    private boolean playerglobalAir;
+
+    @Override
+    protected String getToolGroupName() {
+        return "Royale";
+    }
+
+    @Override
+    protected String getFlexTool() {
+        return "PLAYERGLOBALC";
+    }
+
+    @Override
+    protected String getConfigFileName() throws MojoExecutionException {
+        return "generate-playerglobal-config.xml";
+    }
+
+    @Override
+    protected File getOutput() throws MojoExecutionException {
+        return new File(outputDirectory, outputDirectoryName);
+    }
+
+    @Override
+    protected VelocityContext getVelocityContext() throws MojoExecutionException {
+        VelocityContext context = super.getVelocityContext();
+        context.put("asdocRoot", new File(project.getBasedir(), playerglobalSourceDirectory));
+        context.put("air", playerglobalAir);
+        return context;
+    }
+
+    @Override
+    protected boolean skip() {
+        if(skipPlayerglobal) {
+            return true;
+        }
+        File inputFolder = new File(project.getBasedir(), playerglobalSourceDirectory);
+        return !inputFolder.exists() || !inputFolder.isDirectory();
+    }
+
+    @Override
+    public void execute() throws MojoExecutionException {
+        File outputDirectory = getOutput();
+        if(!outputDirectory.exists()) {
+            if(!outputDirectory.mkdirs()) {
+                throw new MojoExecutionException("Could not create output directory " + outputDirectory.getPath());
+            }
+        }
+
+        super.execute();
+
+        // Add eventually generated source paths to the project.
+        if(outputDirectory.exists()) {
+            project.addCompileSourceRoot(outputDirectory.getPath());
+        }
+    }
+
+}
diff --git a/royale-maven-plugin/src/main/resources/META-INF/plexus/components.xml b/royale-maven-plugin/src/main/resources/META-INF/plexus/components.xml
index 436822b..15b1809 100644
--- a/royale-maven-plugin/src/main/resources/META-INF/plexus/components.xml
+++ b/royale-maven-plugin/src/main/resources/META-INF/plexus/components.xml
@@ -32,7 +32,8 @@
                         <phases>
                             <!-- Generate ActionScript from JavaScript -->
                             <generate-sources>
-                                org.apache.royale.compiler:royale-maven-plugin:generate-extern
+                                org.apache.royale.compiler:royale-maven-plugin:generate-extern,
+                                org.apache.royale.compiler:royale-maven-plugin:generate-playerglobal,
                             </generate-sources>
                             <!--
                                 Generate JavaScript sources from the ActionScript sources.
@@ -47,6 +48,7 @@
                                 org.apache.royale.compiler:royale-maven-plugin:compile-as,
                                 org.apache.royale.compiler:royale-maven-plugin:compile-js,
                                 org.apache.royale.compiler:royale-maven-plugin:compile-extern,
+                                org.apache.royale.compiler:royale-maven-plugin:compile-playerglobal,
                             </compile>
                             <process-test-resources>
                                 org.apache.maven.plugins:maven-resources-plugin:testResources
diff --git a/royale-maven-plugin/src/main/resources/config/compile-playerglobal-config.xml b/royale-maven-plugin/src/main/resources/config/compile-playerglobal-config.xml
new file mode 100644
index 0000000..5bb1c99
--- /dev/null
+++ b/royale-maven-plugin/src/main/resources/config/compile-playerglobal-config.xml
@@ -0,0 +1,101 @@
+<!--
+
+  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.
+
+-->
+<royale-config>
+
+    <compiler>
+
+        <accessible>false</accessible>
+        <debug>$debug</debug>
+
+        <library-path>
+#foreach($artifact in $libraries)           <path-element>$artifact.file</path-element>
+#end
+        </library-path>
+
+        <external-library-path>
+#foreach($artifact in $externalLibraries)           <path-element>$artifact.file</path-element>
+#end
+        </external-library-path>
+
+        <source-path>
+#foreach($sourcePath in $sourcePaths)           <path-element>$sourcePath</path-element>
+#end
+        </source-path>
+
+        <namespaces>
+#foreach($namespace in $namespaces)            <namespace>
+                <uri>$namespace.uri</uri>
+                <manifest>$namespace.manifest</manifest>
+            </namespace>
+#end
+#if($languageNamespace)
+            <namespace>
+                <uri>$languageNamespace.uri</uri>
+                <manifest>$languageNamespace.manifest</manifest>
+            </namespace>
+#end
+        </namespaces>
+
+        <warn-no-constructor>false</warn-no-constructor>
+
+        <mxml>
+            <children-as-data>true</children-as-data>
+        </mxml>
+
+        <show-deprecation-warnings>false</show-deprecation-warnings>
+
+#foreach($define in $defines)        <define>
+            <name>$define.name</name>
+            <value>$define.value</value>
+        </define>
+#end
+
+        <strict-xml>true</strict-xml>
+    </compiler>
+
+#if($includeSources)
+    <include-sources>
+#foreach($sourcePath in $sourcePaths)        <path-element>$sourcePath</path-element>
+#end
+    </include-sources>
+#end
+
+#if($includeClasses)
+    <include-classes>
+#foreach($includeClass in $includeClasses)        <class>$includeClass</class>
+#end
+    </include-classes>
+#end
+
+#if($namespaceUris)
+    <include-namespaces>
+#foreach($namespaceUri in $namespaceUris)        <uri>$namespaceUri</uri>
+#end
+    </include-namespaces>
+#end
+
+#foreach($includeFile in $includeFiles)    <include-file>
+        <name>$includeFile.name</name>
+        <path>$includeFile.path</path>
+    </include-file>
+#end
+
+    <output>${output}</output>
+
+</royale-config>
diff --git a/royale-maven-plugin/src/main/resources/config/generate-playerglobal-config.xml b/royale-maven-plugin/src/main/resources/config/generate-playerglobal-config.xml
new file mode 100644
index 0000000..6bd34d2
--- /dev/null
+++ b/royale-maven-plugin/src/main/resources/config/generate-playerglobal-config.xml
@@ -0,0 +1,23 @@
+<!--
+
+  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.
+
+-->
+<royale-config>
+    <as-root>${output.path}</as-root>
+    <asdoc-root>${asdocRoot.path}</asdoc-root>
+    <air>${air}</air>
+</royale-config>
diff --git a/royaleunit-ant-tasks/pom.xml b/royaleunit-ant-tasks/pom.xml
index 0a8a096..97774c1 100644
--- a/royaleunit-ant-tasks/pom.xml
+++ b/royaleunit-ant-tasks/pom.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>

+<?xml version="1.0" encoding="UTF-8"?>
 <!--
 
   Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,51 +16,68 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 
---><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

-  <modelVersion>4.0.0</modelVersion>

-

-  <parent>

-    <groupId>org.apache.royale.compiler</groupId>

-    <artifactId>royale-compiler-parent</artifactId>

-    <version>0.9.7</version>

-  </parent>

-

-  <artifactId>royaleunit-ant-tasks</artifactId>

-  <version>0.9.7</version>

-

-  <name>Apache Royale: RoyaleUnit Ant Tasks</name>

-

-  <dependencies>

-    <dependency>

-      <groupId>org.apache.ant</groupId>

-      <artifactId>ant</artifactId>

-      <version>1.7.0</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.ant</groupId>

-      <artifactId>ant-launcher</artifactId>

-      <version>1.7.0</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.ant</groupId>

-      <artifactId>ant-testutil</artifactId>

-      <version>1.7.0</version>

-    </dependency>

-    <dependency>

-      <groupId>dom4j</groupId>

-      <artifactId>dom4j</artifactId>

-      <version>1.6.1</version>

-    </dependency>

-    <dependency>

-      <groupId>org.java-websocket</groupId>

-      <artifactId>Java-WebSocket</artifactId>

-      <version>1.4.0</version>

-    </dependency>

-    <dependency>

-      <groupId>org.slf4j</groupId>

-      <artifactId>slf4j-simple</artifactId>

-      <version>1.7.25</version>

-    </dependency>

-  </dependencies>

-

-<properties><project.build.outputTimestamp>2020-05-07T15:02:12Z</project.build.outputTimestamp></properties></project>

+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.royale.compiler</groupId>
+    <artifactId>royale-compiler-parent</artifactId>
+    <version>0.9.8</version>
+  </parent>
+
+  <artifactId>royaleunit-ant-tasks</artifactId>
+  <version>0.9.8</version>
+
+  <name>Apache Royale: RoyaleUnit Ant Tasks</name>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifestEntries>
+              <!-- These paths are all defined the way the layout will be in the distribution -->
+              <Class-Path>dom4j.jar java-websocket.jar slf4j-api.jar</Class-Path>
+            </manifestEntries>
+          </archive>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.ant</groupId>
+      <artifactId>ant</artifactId>
+      <version>1.7.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.ant</groupId>
+      <artifactId>ant-launcher</artifactId>
+      <version>1.7.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.ant</groupId>
+      <artifactId>ant-testutil</artifactId>
+      <version>1.7.0</version>
+    </dependency>
+    <dependency>
+      <groupId>dom4j</groupId>
+      <artifactId>dom4j</artifactId>
+      <version>1.6.1</version>
+    </dependency>
+    <dependency>
+      <groupId>org.java-websocket</groupId>
+      <artifactId>Java-WebSocket</artifactId>
+      <version>1.4.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <version>1.7.25</version>
+    </dependency>
+  </dependencies>
+
+<properties /></project>
diff --git a/swfutils/pom.xml b/swfutils/pom.xml
index 5879d47..8f57d9d 100644
--- a/swfutils/pom.xml
+++ b/swfutils/pom.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>

+<?xml version="1.0" encoding="UTF-8"?>
 <!--
 
   Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,19 +16,19 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 
---><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

-  <modelVersion>4.0.0</modelVersion>

-

-  <parent>

-    <groupId>org.apache.royale.compiler</groupId>

-    <artifactId>royale-compiler-parent</artifactId>

-    <version>0.9.7</version>

-  </parent>

-

-  <artifactId>swfutils</artifactId>

-  <version>0.9.7</version>

-

-  <name>Apache Royale: Compiler: SWFUtils</name>

-  <description>The Apache Royale Compiler SWF Utility classes</description>

-

-<properties><project.build.outputTimestamp>2020-05-07T15:02:12Z</project.build.outputTimestamp></properties></project>

+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.royale.compiler</groupId>
+    <artifactId>royale-compiler-parent</artifactId>
+    <version>0.9.8</version>
+  </parent>
+
+  <artifactId>swfutils</artifactId>
+  <version>0.9.8</version>
+
+  <name>Apache Royale: Compiler: SWFUtils</name>
+  <description>The Apache Royale Compiler SWF Utility classes</description>
+
+<properties /></project>