You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by gr...@apache.org on 2019/06/11 03:46:26 UTC

[royale-asjs] branch develop updated: Squashed commit of the following:

This is an automated email from the ASF dual-hosted git repository.

gregdove pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new c6379b8  Squashed commit of the following:
c6379b8 is described below

commit c6379b85d8aa9d164d49b09402a23f30cb4aee3a
Author: greg-dove <gr...@gmail.com>
AuthorDate: Tue Jun 11 15:24:09 2019 +1200

    Squashed commit of the following:
    
    commit 13e3266ba2f23365a49ed4ef90f199fb152e23aa
    Merge: 0ce7447bb 8d56761ef
    Author: greg-dove <gr...@gmail.com>
    Date:   Tue Jun 11 14:53:09 2019 +1200
    
        Merge branch 'develop' into improvements/Language
    
    commit 0ce7447bbcee6f46e56073c871f1720843423b61
    Author: greg-dove <gr...@gmail.com>
    Date:   Tue Jun 11 14:46:08 2019 +1200
    
        Port of language tests to RoyaleUnit. Added them in Core for now (unsure if they can go in Language or not at this point, to check with Josh...)
        Updated the ant test clean task in BasicJS and CoreJS to clean the target in the js test dir.
    
    commit 6259a5e8a38637b6b8faadfdac32a989272fcdc5
    Author: greg-dove <gr...@gmail.com>
    Date:   Tue Jun 11 14:43:41 2019 +1200
    
        Fixes in Vector, and added Class as synthType.
    
    commit 9cbb250048a1712598339a4c0c9c64541c2dccb8
    Author: greg-dove <gr...@gmail.com>
    Date:   Fri Jun 7 10:33:02 2019 +1200
    
        update to Reflection to support PAYG inclusion of core types (or any other 'native' types via same approach)
    
    commit 8bf1494882fc03bb5709b4a64a0aa5d70baf38d8
    Merge: c16f58005 f9c4b58c0
    Author: greg-dove <gr...@gmail.com>
    Date:   Sat May 25 13:49:32 2019 +1200
    
        Merge branch 'develop' into improvements/Language
    
    commit c16f5800549eb5db6363ecc19f351f88f284509d
    Author: greg-dove <gr...@gmail.com>
    Date:   Sat May 25 10:38:47 2019 +1200
    
        Last commit was empty...this time with changes!:Fix coercion of undefined value in Vector.<String>, added more specific tests for Vector.<String> and Vector.<Boolean>
    
    commit 3ee2fc3c5064eae8f81b80a9024c3855a8f6638f
    Author: greg-dove <gr...@gmail.com>
    Date:   Sat May 25 10:30:24 2019 +1200
    
        Fix Vector element coercion for String, added specific tests for String and Boolean
        Fix coercion of undefined value in Vector.<String>, added more specific tests for Vector.<String> and Vector.<Boolean>
    
    commit adfc97543e317a5ae673cb4585a128a8a625910c
    Merge: 87961c6ea c9943e1b4
    Author: greg-dove <gr...@gmail.com>
    Date:   Thu May 23 18:38:38 2019 +1200
    
        Merge branch 'develop' into improvements/Language
    
    commit 87961c6eafd07b8f1fa1d8ec0f9745261373f3c4
    Author: greg-dove <gr...@gmail.com>
    Date:   Thu May 23 18:31:56 2019 +1200
    
        tweaks to build settings to use new line separations support in the additionalCompilerOptions
    
    commit bce6ba5a778372f10f60ba4f7af872da56740a39
    Author: greg-dove <gr...@gmail.com>
    Date:   Thu May 23 18:30:06 2019 +1200
    
        refactor private beads to correspond to different requirements between targets
    
    commit beac5c6040697c971ab371d5018fe13c59ec1895
    Author: greg-dove <gr...@gmail.com>
    Date:   Thu May 23 18:22:36 2019 +1200
    
        Vector improvements and optimizations (runtime performance, output footprint)
    
    commit bc4bf05ad1aab648e14c13300899bd29c7a731ed
    Author: greg-dove <gr...@gmail.com>
    Date:   Mon May 20 12:23:54 2019 +1200
    
        minor Vector optimizations
    
    commit f2701572ff424039f121e1c4dba1beae630d7377
    Author: greg-dove <gr...@gmail.com>
    Date:   Mon May 20 12:05:16 2019 +1200
    
        Add js-release output to HelloWorld maven build
    
    commit 6a858570720d0647641680d47d44ba1635d4d03d
    Merge: 99b6c63f0 3be398a35
    Author: greg-dove <gr...@gmail.com>
    Date:   Mon May 20 10:52:31 2019 +1200
    
        Merge branch 'develop' into improvements/Language
    
    commit 99b6c63f0d7de07f2619ebbec361525b4830ea8d
    Merge: cc5612e02 4ddbef8b7
    Author: greg-dove <gr...@gmail.com>
    Date:   Sun May 19 18:11:00 2019 +1200
    
        Merge branch 'develop' into improvements/Language
    
    commit cc5612e028b81899710e989f36386aac51be03b6
    Author: greg-dove <gr...@gmail.com>
    Date:   Sun May 19 18:03:49 2019 +1200
    
        Added conforming slice method to Vector.
    
    commit b20dccedeae6c0689c160325d2b80d2b0664755e
    Author: greg-dove <gr...@gmail.com>
    Date:   Sun May 19 17:35:37 2019 +1200
    
        Updates and tweaks to XML. Port adhoc tests and add new XML tests (97 assertions for XML) to UnitTests manualtest
    
    commit d24539c74ad814534b712c562cd5a67683da6de4
    Merge: 722f16599 160d3bbd5
    Author: greg-dove <gr...@gmail.com>
    Date:   Wed May 15 11:00:00 2019 +1200
    
        Merge branch 'develop' into improvements/Language
    
    commit 722f16599441be4fd0243d6fe9f2cd856f1a6b0b
    Author: greg-dove <gr...@gmail.com>
    Date:   Wed May 15 10:54:34 2019 +1200
    
        Numerous updates to XML/XMLList to address issues identified during testing
    
    commit 668e919d1e83f8f8ed327a0699c735ff17f88265
    Author: greg-dove <gr...@gmail.com>
    Date:   Tue May 7 19:20:49 2019 +1200
    
        Swap all framework build 'off' settings with the new 'off' value for the new config options
    
    commit 453fd5bddf16a107769a66b549be29786d550685
    Author: greg-dove <gr...@gmail.com>
    Date:   Sun May 5 06:52:23 2019 +1200
    
        Leaving conditional stuff out for now. It will definitely be possible to introduce this type of in the future, but it affects all instances. Needs some discussion.
        Also renamed 'override' group changin 'fixedLength' to 'mainTypeSafety' (it is not just for fixed length safety, and just represents commonly used mutation methods)
    
    commit 34abd8682973b1188125451bc357bd9b45fcbbaa
    Author: greg-dove <gr...@gmail.com>
    Date:   Sat May 4 19:46:40 2019 +1200
    
        almost forgot updated tests
    
    commit 0a27a593286980aa7740ff618dff48dca1e1d304
    Author: greg-dove <gr...@gmail.com>
    Date:   Sat May 4 19:42:19 2019 +1200
    
        Example of extra type safety:
        Fix for error exposed by complex implicit coercion being on (TypeError: cannot convert components.SomePopUpContent to org.apache.royale.core.IBead) in Vector.push
    
    commit 146fd8c828911a2c2f0a2d41cf633f75f29978fb
    Author: greg-dove <gr...@gmail.com>
    Date:   Sat May 4 18:24:37 2019 +1200
    
        Squashed commit of cumulative work on Language improvements
---
 examples/royale/HelloWorld/pom.xml                 |   15 +
 .../main/royale/components/SomePopUpContent.mxml   |   11 +-
 .../AceJS/src/main/config/compile-js-config.xml    |    4 +
 .../BasicJS/src/main/config/compile-js-config.xml  |    4 +
 .../js/projects/BasicJS/src/test/royale/build.xml  |    8 +-
 .../src/main/config/compile-js-config.xml          |    4 +
 .../ChartsJS/src/main/config/compile-js-config.xml |    4 +
 .../src/main/config/compile-js-config.xml          |    4 +
 .../CoreJS/src/main/config/compile-js-config.xml   |    4 +
 .../js/projects/CoreJS/src/test/royale/build.xml   |    8 +-
 .../src/main/config/compile-js-config.xml          |    4 +
 .../src/main/config/compile-js-config.xml          |    4 +
 .../src/main/config/compile-js-config.xml          |    4 +
 .../src/main/config/compile-js-config.xml          |    4 +
 .../FlatJS/src/main/config/compile-js-config.xml   |    4 +
 .../src/main/config/compile-js-config.xml          |    4 +
 .../src/main/config/compile-js-config.xml          |    4 +
 .../src/main/config/compile-js-config.xml          |    4 +
 .../src/main/config/compile-js-config.xml          |    4 +
 .../HTML5JS/src/main/config/compile-js-config.xml  |    4 +
 .../HTMLJS/src/main/config/compile-js-config.xml   |    4 +
 .../IconsJS/src/main/config/compile-js-config.xml  |    4 +
 .../JQueryJS/src/main/config/compile-js-config.xml |    4 +
 .../JewelJS/src/main/config/compile-js-config.xml  |    4 +
 .../src/main/config/compile-js-config.xml          |    4 +
 .../src/main/config/compile-js-config.xml          |    4 +
 .../src/main/config/compile-js-config.xml          |    4 +
 .../MobileJS/src/main/config/compile-js-config.xml |    4 +
 .../src/main/config/compile-js-config.xml          |    4 +
 .../src/main/config/compile-js-config.xml          |    9 +-
 .../src/main/config/compile-js-config.xml          |    4 +
 .../src/main/config/compile-js-config.xml          |    4 +
 .../src/main/config/compile-js-config.xml          |    4 +
 .../src/main/config/compile-js-config.xml          |    4 +
 .../TLFJS/src/main/config/compile-js-config.xml    |    6 +-
 .../TextJS/src/main/config/compile-js-config.xml   |    4 +
 .../XMLJS/src/main/config/compile-js-config.xml    |    4 +
 frameworks/projects/Ace/pom.xml                    |    2 +-
 frameworks/projects/Basic/pom.xml                  |    2 +-
 .../main/royale/org/apache/royale/core/UIBase.as   |   99 +-
 frameworks/projects/Binding/pom.xml                |    2 +-
 frameworks/projects/Charts/pom.xml                 |    2 +-
 frameworks/projects/Collections/pom.xml            |    2 +-
 frameworks/projects/Core/pom.xml                   |    9 +-
 .../org/apache/royale/core/HTMLElementWrapper.as   |  112 +-
 .../src/test/royale/flexUnitTests/CoreTester.as    |   11 +
 .../language/LanguageTesterIntUint.as              |  164 +++
 .../language/LanguageTesterTestClass.as            |  344 +++++
 .../flexUnitTests/language/LanguageTesterTestIs.as |  245 ++++
 .../language/LanguageTesterTestVector.as           | 1409 +++++++++++++++++++
 .../language/support/ITestInterface.as             |   13 +-
 .../language/support/ITestInterface2.as            |   14 +-
 .../language}/support/ITestInterface3.as           |   14 +-
 .../language/support/ITestInterface4.as            |   14 +-
 .../flexUnitTests/language/support/TestClass1.as   |   19 +-
 .../flexUnitTests/language/support/TestClass2.as   |   19 +-
 .../flexUnitTests/language/support/TestClass3.as   |   11 +-
 .../flexUnitTests/language/support/TestClass4.as   |   20 +-
 .../flexUnitTests/language/support/TestClass5.as   |   20 +-
 frameworks/projects/CreateJS/pom.xml               |    2 +-
 frameworks/projects/DragDrop/pom.xml               |    2 +-
 frameworks/projects/Effects/pom.xml                |    2 +-
 frameworks/projects/Express/pom.xml                |    2 +-
 frameworks/projects/Flat/pom.xml                   |    2 +-
 frameworks/projects/FontAwesome/pom.xml            |    2 +-
 frameworks/projects/Formatters/pom.xml             |    2 +-
 frameworks/projects/GoogleMaps/pom.xml             |    2 +-
 frameworks/projects/Graphics/pom.xml               |    2 +-
 frameworks/projects/HTML/pom.xml                   |    2 +-
 frameworks/projects/HTML5/pom.xml                  |    2 +-
 frameworks/projects/Icons/pom.xml                  |    2 +-
 frameworks/projects/JQuery/pom.xml                 |    2 +-
 frameworks/projects/Jewel/pom.xml                  |    2 +-
 frameworks/projects/Language/pom.xml               |    2 +-
 .../projects/Language/src/main/royale/QName.as     |    3 +-
 .../royale/org/apache/royale/utils/Language.as     | 1368 ++++++++++++++-----
 frameworks/projects/MXRoyale/pom.xml               |    2 +-
 frameworks/projects/MaterialDesignLite/pom.xml     |    2 +-
 frameworks/projects/Mobile/pom.xml                 |    2 +-
 frameworks/projects/Network/pom.xml                |    2 +-
 frameworks/projects/Reflection/pom.xml             |   20 +-
 .../src/main/config/compile-swf-config.xml         |   10 +-
 .../src/main/royale/ReflectionClasses.as           |   66 +
 .../royale/reflection/DefinitionWithMetaData.as    |    4 +-
 .../org/apache/royale/reflection/ExtraData.as      |  155 +++
 .../org/apache/royale/reflection/TypeDefinition.as |   31 +-
 .../royale/reflection/beads/ClassAliasBead.as      |    2 +-
 .../org/apache/royale/reflection/describeType.as   |   25 +-
 .../royale/reflection/getDefinitionByName.as       |   36 +-
 .../royale/reflection/getQualifiedClassName.as     |   52 +-
 .../AS3Array.as}                                   |   61 +-
 .../AS3Boolean.as}                                 |   58 +-
 .../apache/royale/reflection/nativejs/AS3Number.as |   65 +
 .../apache/royale/reflection/nativejs/AS3String.as |   52 +
 .../apache/royale/reflection/nativejs/AS3Vector.as |   63 +
 .../{getDefinitionByName.as => nativejs/AS3int.as} |   61 +-
 .../AS3uint.as}                                    |   60 +-
 frameworks/projects/RoyaleSite/pom.xml             |    2 +-
 frameworks/projects/RoyaleUnit/pom.xml             |   30 +-
 frameworks/projects/SparkRoyale/pom.xml            |    2 +-
 frameworks/projects/Storage/pom.xml                |    2 +-
 frameworks/projects/TLF/pom.xml                    |    9 +-
 frameworks/projects/Text/pom.xml                   |    2 +-
 frameworks/projects/XML/src/main/royale/XML.as     |  530 ++++----
 frameworks/projects/XML/src/main/royale/XMLList.as |   43 +-
 frameworks/projects/pom.xml                        |    2 +-
 manualtests/UnitTests/build.xml                    |   20 +-
 manualtests/UnitTests/pom.xml                      |   45 +-
 .../src/main/config/compile-app-config.xml         |   17 +-
 .../UnitTests/src/main/royale/MyInitialView.mxml   |   68 +-
 .../UnitTests/src/main/royale/TestClasses.as       |    4 +-
 .../UnitTests/src/main/royale/UnitTests.mxml       |   13 +-
 .../src/main/royale/flexUnitTests/CoreTester.as    |   15 +-
 .../royale/flexUnitTests/GithubIssuesTester.as     |   16 +-
 .../{ReflectionTester.as => LanguageTester.as}     |   25 +-
 .../src/main/royale/flexUnitTests/NetworkTester.as |   11 +-
 .../royale/flexUnitTests/ObservedBugsTester.as     |    8 +-
 .../main/royale/flexUnitTests/ReflectionTester.as  |   23 +-
 .../{NetworkTester.as => XMLTester.as}             |   20 +-
 .../royale/flexUnitTests/core/ArrayTesterTest.as   |  163 +++
 .../flexUnitTests/core/BinaryDataTesterTest.as     | 1206 ++++++++---------
 .../src/main/royale/flexUnitTests/core/MD5Test.as  |   10 +-
 .../royale/flexUnitTests/core/StrandTesterTest.as  |    6 +-
 .../{StrandTesterTest.as => support/TestVO.as}     |   46 +-
 .../GithubIssues2018.as}                           |   49 +-
 .../{GithubTesterTest.as => GithubIssues2019.as}   |   46 +-
 .../language/LanguageTesterIntUint.as              |  168 +++
 .../language/LanguageTesterTestClass.as            |  348 +++++
 .../flexUnitTests/language/LanguageTesterTestIs.as |  249 ++++
 .../language/LanguageTesterTestVector.as           | 1412 ++++++++++++++++++++
 .../support/ITestInterface.as}                     |   13 +-
 .../support/ITestInterface2.as}                    |   14 +-
 .../support/ITestInterface3.as                     |   14 +-
 .../support/ITestInterface4.as}                    |   14 +-
 .../support/TestClass1.as}                         |   19 +-
 .../support/TestClass2.as}                         |   19 +-
 .../support/TestClass3.as}                         |   11 +-
 .../support/TestClass4.as}                         |   20 +-
 .../support/TestClass5.as}                         |   20 +-
 .../network/AMFBinaryDataTesterTest.as             |  995 +++++++-------
 .../network/support/DynamicPropertyWriter.as       |   74 +-
 .../network/support/DynamicTestClass.as            |   28 +-
 .../network/support/DynamicTestClass2.as           |   28 +-
 .../flexUnitTests/network/support/TestClass1.as    |   26 +-
 .../flexUnitTests/network/support/TestClass2.as    |   33 +-
 .../flexUnitTests/network/support/TestClass3.as    |   63 +-
 .../flexUnitTests/network/support/TestClass4.as    |   24 +-
 .../flexUnitTests/observedbugs/ObservedBugTests.as |   62 +-
 .../reflection/ReflectionTesterNativeTypes.as      |  233 ++++
 .../reflection/ReflectionTesterTest.as             |  415 +++---
 .../reflection/ReflectionTesterTestAlias.as        |   55 +-
 .../reflection/ReflectionTesterTestDynamic.as      |  320 ++---
 .../reflection/ReflectionTesterTestUseCache.as     |   60 +-
 .../reflection/support/DynamicTestClass.as         |  146 +-
 .../reflection/support/DynamicTestClass2.as        |   82 +-
 .../reflection/support/DynamicTestClass3.as        |   31 +-
 .../reflection/support/ITestInterface.as           |   12 +-
 .../reflection/support/ITestInterface2.as          |   16 +-
 .../reflection/support/ITestInterface3.as          |   12 +-
 .../reflection/support/ITestInterface4.as          |   16 +-
 .../flexUnitTests/reflection/support/TestClass1.as |  153 ++-
 .../flexUnitTests/reflection/support/TestClass2.as |  181 +--
 .../flexUnitTests/reflection/support/TestClass3.as |   39 +-
 .../flexUnitTests/reflection/support/TestClass4.as |  165 ++-
 .../flexUnitTests/reflection/support/TestClass5.as |  132 +-
 .../flexUnitTests/xml/XMLTesterGeneralTest.as      |  815 +++++++++++
 .../flexUnitTests/xml/XMLTesterStringifyTest.as    |  168 +++
 .../src/main/royale/flexunit/framework/Assert.as   |    3 +-
 .../main/royale/testshim/RoyaleUnitTestRunner.as   |  444 +++---
 .../src/main/royale/testshim/TestResult.as         |   78 +-
 manualtests/UnitTests/testsview/index.html         |   10 +-
 manualtests/build_example.xml                      |   20 +-
 172 files changed, 11204 insertions(+), 3447 deletions(-)

diff --git a/examples/royale/HelloWorld/pom.xml b/examples/royale/HelloWorld/pom.xml
index 9f76b2d..95be5cb 100644
--- a/examples/royale/HelloWorld/pom.xml
+++ b/examples/royale/HelloWorld/pom.xml
@@ -39,7 +39,15 @@
         <artifactId>royale-maven-plugin</artifactId>
         <extensions>true</extensions>
         <configuration>
+          <targets>SWF,JSRoyale</targets>
+          <debug>false</debug>
+          <removeCirculars>true</removeCirculars>
           <mainClass>HelloWorld.mxml</mainClass>
+          <additionalCompilerOptions>
+            -js-complex-implicit-coercions=false;
+            -js-vector-index-checks=false;
+            -js-resolve-uncertain=false;
+          </additionalCompilerOptions>
         </configuration>
       </plugin>
     </plugins>
@@ -47,6 +55,13 @@
 
   <dependencies>
     <dependency>
+      <groupId>com.adobe.flash.framework</groupId>
+      <artifactId>playerglobal</artifactId>
+      <version>${flash.version}</version>
+      <type>swc</type>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
       <groupId>org.apache.royale.framework</groupId>
       <artifactId>Basic</artifactId>
       <version>0.9.6-SNAPSHOT</version>
diff --git a/examples/royale/TourDeJewel/src/main/royale/components/SomePopUpContent.mxml b/examples/royale/TourDeJewel/src/main/royale/components/SomePopUpContent.mxml
index 06586da..fdea8f6 100644
--- a/examples/royale/TourDeJewel/src/main/royale/components/SomePopUpContent.mxml
+++ b/examples/royale/TourDeJewel/src/main/royale/components/SomePopUpContent.mxml
@@ -18,7 +18,8 @@ limitations under the License.
 
 -->
 <j:VGroup xmlns:fx="http://ns.adobe.com/mxml/2009" 
-    xmlns:j="library://ns.apache.org/royale/jewel" 
+    xmlns:j="library://ns.apache.org/royale/jewel"
+          implements="org.apache.royale.core.IBead"
     xmlns:js="library://ns.apache.org/royale/basic" 
     xmlns:html="library://ns.apache.org/royale/html"
     width="500" height="400" gap="3">
@@ -26,6 +27,12 @@ limitations under the License.
     <fx:Script>
         <![CDATA[
             import org.apache.royale.events.Event;
+            import org.apache.royale.core.IStrand;
+
+            private var _strand:IStrand;
+            public function set strand(value:IStrand):void {
+                _strand = value;
+            }
         ]]>
     </fx:Script>
 
@@ -34,4 +41,4 @@ limitations under the License.
     <j:DateField/>
     <j:Button text="Close me!" emphasis="primary" click="dispatchEvent(new Event('closePopUp'))"/>
 
-</j:VGroup>
\ No newline at end of file
+</j:VGroup>
diff --git a/frameworks/js/projects/AceJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/AceJS/src/main/config/compile-js-config.xml
index 01a5460..3a6a286 100644
--- a/frameworks/js/projects/AceJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/AceJS/src/main/config/compile-js-config.xml
@@ -96,6 +96,10 @@
     </include-namespaces>
 
     <js-default-initializers>false</js-default-initializers>
+
+    <js-complex-implicit-coercions>false</js-complex-implicit-coercions>
+    <js-resolve-uncertain>false</js-resolve-uncertain>
+    <js-vector-index-checks>false</js-vector-index-checks>
         
 
 </royale-config>
diff --git a/frameworks/js/projects/BasicJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/BasicJS/src/main/config/compile-js-config.xml
index 328c1e5..ba95ad1 100644
--- a/frameworks/js/projects/BasicJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/BasicJS/src/main/config/compile-js-config.xml
@@ -102,6 +102,10 @@
     </include-namespaces>
 
     <js-default-initializers>false</js-default-initializers>
+
+    <js-complex-implicit-coercions>false</js-complex-implicit-coercions>
+    <js-resolve-uncertain>false</js-resolve-uncertain>
+    <js-vector-index-checks>false</js-vector-index-checks>
         
 
 </royale-config>
diff --git a/frameworks/js/projects/BasicJS/src/test/royale/build.xml b/frameworks/js/projects/BasicJS/src/test/royale/build.xml
index 37d5c7e..9bc370b 100644
--- a/frameworks/js/projects/BasicJS/src/test/royale/build.xml
+++ b/frameworks/js/projects/BasicJS/src/test/royale/build.xml
@@ -93,11 +93,11 @@
 
     <target name="main" depends="clean,compile,test" description="Clean test of ${target.name}">
     </target>
-    
+
     <target name="clean">
-        <delete failonerror="false">
-            <fileset dir="${basedir}">
-                <include name="FlexUnitRoyaleApplication.swf"/>
+        <delete failonerror="false" includeemptydirs="true">
+            <fileset dir="${basedir}/target">
+                <include name="**/**"/>
             </fileset>
         </delete>
         <delete failonerror="false" includeemptydirs="true">
diff --git a/frameworks/js/projects/BindingJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/BindingJS/src/main/config/compile-js-config.xml
index ae639b5..fd428ce 100644
--- a/frameworks/js/projects/BindingJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/BindingJS/src/main/config/compile-js-config.xml
@@ -89,6 +89,10 @@
     </include-namespaces>
 
     <js-default-initializers>false</js-default-initializers>
+
+    <js-complex-implicit-coercions>false</js-complex-implicit-coercions>
+    <js-resolve-uncertain>false</js-resolve-uncertain>
+    <js-vector-index-checks>false</js-vector-index-checks>
         
 
 </royale-config>
diff --git a/frameworks/js/projects/ChartsJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/ChartsJS/src/main/config/compile-js-config.xml
index 2a1286a..16d93d5 100644
--- a/frameworks/js/projects/ChartsJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/ChartsJS/src/main/config/compile-js-config.xml
@@ -94,6 +94,10 @@
     </include-namespaces>
 
     <js-default-initializers>false</js-default-initializers>
+
+    <js-complex-implicit-coercions>false</js-complex-implicit-coercions>
+    <js-resolve-uncertain>false</js-resolve-uncertain>
+    <js-vector-index-checks>false</js-vector-index-checks>
         
 
 </royale-config>
diff --git a/frameworks/js/projects/CollectionsJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/CollectionsJS/src/main/config/compile-js-config.xml
index cdd072e..688f9b4 100644
--- a/frameworks/js/projects/CollectionsJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/CollectionsJS/src/main/config/compile-js-config.xml
@@ -87,5 +87,9 @@
 
     <js-default-initializers>false</js-default-initializers>
 
+    <js-complex-implicit-coercions>false</js-complex-implicit-coercions>
+    <js-resolve-uncertain>false</js-resolve-uncertain>
+    <js-vector-index-checks>false</js-vector-index-checks>
+
 
 </royale-config>
diff --git a/frameworks/js/projects/CoreJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/CoreJS/src/main/config/compile-js-config.xml
index e912e57..075aba7 100644
--- a/frameworks/js/projects/CoreJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/CoreJS/src/main/config/compile-js-config.xml
@@ -92,6 +92,10 @@
     </include-namespaces>
 
     <js-default-initializers>false</js-default-initializers>
+
+    <js-complex-implicit-coercions>false</js-complex-implicit-coercions>
+    <js-resolve-uncertain>false</js-resolve-uncertain>
+    <js-vector-index-checks>false</js-vector-index-checks>
     
 
 </royale-config>
diff --git a/frameworks/js/projects/CoreJS/src/test/royale/build.xml b/frameworks/js/projects/CoreJS/src/test/royale/build.xml
index a565d01..6e20c38 100644
--- a/frameworks/js/projects/CoreJS/src/test/royale/build.xml
+++ b/frameworks/js/projects/CoreJS/src/test/royale/build.xml
@@ -93,11 +93,11 @@
 
     <target name="main" depends="clean,compile,test" description="Clean test of ${target.name}">
     </target>
-    
+
     <target name="clean">
-        <delete failonerror="false">
-            <fileset dir="${basedir}">
-                <include name="FlexUnitRoyaleApplication.swf"/>
+        <delete failonerror="false" includeemptydirs="true">
+            <fileset dir="${basedir}/target">
+                <include name="**/**"/>
             </fileset>
         </delete>
         <delete failonerror="false" includeemptydirs="true">
diff --git a/frameworks/js/projects/CreateJSJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/CreateJSJS/src/main/config/compile-js-config.xml
index 3d24375..0bc94a6 100644
--- a/frameworks/js/projects/CreateJSJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/CreateJSJS/src/main/config/compile-js-config.xml
@@ -95,6 +95,10 @@
     </include-namespaces>
 
     <js-default-initializers>false</js-default-initializers>
+
+    <js-complex-implicit-coercions>false</js-complex-implicit-coercions>
+    <js-resolve-uncertain>false</js-resolve-uncertain>
+    <js-vector-index-checks>false</js-vector-index-checks>
     
 
 </royale-config>
diff --git a/frameworks/js/projects/DragDropJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/DragDropJS/src/main/config/compile-js-config.xml
index d51cc16..167c800 100644
--- a/frameworks/js/projects/DragDropJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/DragDropJS/src/main/config/compile-js-config.xml
@@ -90,6 +90,10 @@
     </include-namespaces>
 
     <js-default-initializers>false</js-default-initializers>
+
+    <js-complex-implicit-coercions>false</js-complex-implicit-coercions>
+    <js-resolve-uncertain>false</js-resolve-uncertain>
+    <js-vector-index-checks>false</js-vector-index-checks>
         
 
 </royale-config>
diff --git a/frameworks/js/projects/EffectsJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/EffectsJS/src/main/config/compile-js-config.xml
index ba94edf..f9ccf29 100644
--- a/frameworks/js/projects/EffectsJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/EffectsJS/src/main/config/compile-js-config.xml
@@ -90,6 +90,10 @@
     </include-namespaces>
 
     <js-default-initializers>false</js-default-initializers>
+
+    <js-complex-implicit-coercions>false</js-complex-implicit-coercions>
+    <js-resolve-uncertain>false</js-resolve-uncertain>
+    <js-vector-index-checks>false</js-vector-index-checks>
         
 
 </royale-config>
diff --git a/frameworks/js/projects/ExpressJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/ExpressJS/src/main/config/compile-js-config.xml
index 66caac0..76ae536 100644
--- a/frameworks/js/projects/ExpressJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/ExpressJS/src/main/config/compile-js-config.xml
@@ -99,6 +99,10 @@
     </include-namespaces>
 
     <js-default-initializers>false</js-default-initializers>
+
+    <js-complex-implicit-coercions>false</js-complex-implicit-coercions>
+    <js-resolve-uncertain>false</js-resolve-uncertain>
+    <js-vector-index-checks>false</js-vector-index-checks>
         
 
 </royale-config>
diff --git a/frameworks/js/projects/FlatJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/FlatJS/src/main/config/compile-js-config.xml
index a49a245..2130a75 100644
--- a/frameworks/js/projects/FlatJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/FlatJS/src/main/config/compile-js-config.xml
@@ -92,6 +92,10 @@
     </include-namespaces>
 
     <js-default-initializers>false</js-default-initializers>
+
+    <js-complex-implicit-coercions>false</js-complex-implicit-coercions>
+    <js-resolve-uncertain>false</js-resolve-uncertain>
+    <js-vector-index-checks>false</js-vector-index-checks>
         
 
 </royale-config>
diff --git a/frameworks/js/projects/FontAwesomeJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/FontAwesomeJS/src/main/config/compile-js-config.xml
index 762c916..a9b4a3c 100644
--- a/frameworks/js/projects/FontAwesomeJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/FontAwesomeJS/src/main/config/compile-js-config.xml
@@ -92,6 +92,10 @@
     </include-namespaces>
 
     <js-default-initializers>false</js-default-initializers>
+
+    <js-complex-implicit-coercions>false</js-complex-implicit-coercions>
+    <js-resolve-uncertain>false</js-resolve-uncertain>
+    <js-vector-index-checks>false</js-vector-index-checks>
         
 
 </royale-config>
diff --git a/frameworks/js/projects/FormattersJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/FormattersJS/src/main/config/compile-js-config.xml
index a3d8289..8d43f14 100644
--- a/frameworks/js/projects/FormattersJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/FormattersJS/src/main/config/compile-js-config.xml
@@ -90,6 +90,10 @@
     </include-namespaces>
 
     <js-default-initializers>false</js-default-initializers>
+
+    <js-complex-implicit-coercions>false</js-complex-implicit-coercions>
+    <js-resolve-uncertain>false</js-resolve-uncertain>
+    <js-vector-index-checks>false</js-vector-index-checks>
         
 
 </royale-config>
diff --git a/frameworks/js/projects/GoogleMapsJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/GoogleMapsJS/src/main/config/compile-js-config.xml
index 6164ca4..d5ef575 100644
--- a/frameworks/js/projects/GoogleMapsJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/GoogleMapsJS/src/main/config/compile-js-config.xml
@@ -97,6 +97,10 @@
     </include-namespaces>
 
     <js-default-initializers>false</js-default-initializers>
+
+    <js-complex-implicit-coercions>false</js-complex-implicit-coercions>
+    <js-resolve-uncertain>false</js-resolve-uncertain>
+    <js-vector-index-checks>false</js-vector-index-checks>
         
 
 </royale-config>
diff --git a/frameworks/js/projects/GraphicsJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/GraphicsJS/src/main/config/compile-js-config.xml
index 298c16d..2e34366 100644
--- a/frameworks/js/projects/GraphicsJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/GraphicsJS/src/main/config/compile-js-config.xml
@@ -99,6 +99,10 @@
     </include-namespaces>
 
     <js-default-initializers>false</js-default-initializers>
+
+    <js-complex-implicit-coercions>false</js-complex-implicit-coercions>
+    <js-resolve-uncertain>false</js-resolve-uncertain>
+    <js-vector-index-checks>false</js-vector-index-checks>
         
 
 </royale-config>
diff --git a/frameworks/js/projects/HTML5JS/src/main/config/compile-js-config.xml b/frameworks/js/projects/HTML5JS/src/main/config/compile-js-config.xml
index f0e5e37..ca9fcce 100644
--- a/frameworks/js/projects/HTML5JS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/HTML5JS/src/main/config/compile-js-config.xml
@@ -92,6 +92,10 @@
     </include-namespaces>
 
     <js-default-initializers>false</js-default-initializers>
+
+    <js-complex-implicit-coercions>false</js-complex-implicit-coercions>
+    <js-resolve-uncertain>false</js-resolve-uncertain>
+    <js-vector-index-checks>false</js-vector-index-checks>
         
 
 </royale-config>
diff --git a/frameworks/js/projects/HTMLJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/HTMLJS/src/main/config/compile-js-config.xml
index bc2981f..5c75026 100644
--- a/frameworks/js/projects/HTMLJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/HTMLJS/src/main/config/compile-js-config.xml
@@ -103,6 +103,10 @@
     </include-namespaces>
 
     <js-default-initializers>false</js-default-initializers>
+
+    <js-complex-implicit-coercions>false</js-complex-implicit-coercions>
+    <js-resolve-uncertain>false</js-resolve-uncertain>
+    <js-vector-index-checks>false</js-vector-index-checks>
         
 
 </royale-config>
diff --git a/frameworks/js/projects/IconsJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/IconsJS/src/main/config/compile-js-config.xml
index 8d47e0f..828d687 100644
--- a/frameworks/js/projects/IconsJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/IconsJS/src/main/config/compile-js-config.xml
@@ -93,6 +93,10 @@
     </include-namespaces>
 
     <js-default-initializers>false</js-default-initializers>
+
+    <js-complex-implicit-coercions>false</js-complex-implicit-coercions>
+    <js-resolve-uncertain>false</js-resolve-uncertain>
+    <js-vector-index-checks>false</js-vector-index-checks>
         
 
 </royale-config>
diff --git a/frameworks/js/projects/JQueryJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/JQueryJS/src/main/config/compile-js-config.xml
index 0631a82..e3f2cdc 100644
--- a/frameworks/js/projects/JQueryJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/JQueryJS/src/main/config/compile-js-config.xml
@@ -98,6 +98,10 @@
     </include-namespaces>
 
     <js-default-initializers>false</js-default-initializers>
+
+    <js-complex-implicit-coercions>false</js-complex-implicit-coercions>
+    <js-resolve-uncertain>false</js-resolve-uncertain>
+    <js-vector-index-checks>false</js-vector-index-checks>
         
 
 </royale-config>
diff --git a/frameworks/js/projects/JewelJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/JewelJS/src/main/config/compile-js-config.xml
index 56f584b..508b8e2 100644
--- a/frameworks/js/projects/JewelJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/JewelJS/src/main/config/compile-js-config.xml
@@ -100,6 +100,10 @@
     </include-namespaces>
 
     <js-default-initializers>false</js-default-initializers>
+
+    <js-complex-implicit-coercions>false</js-complex-implicit-coercions>
+    <js-resolve-uncertain>false</js-resolve-uncertain>
+    <js-vector-index-checks>false</js-vector-index-checks>
         
 
 </royale-config>
diff --git a/frameworks/js/projects/LanguageJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/LanguageJS/src/main/config/compile-js-config.xml
index dd01e07..bd8fc2e 100644
--- a/frameworks/js/projects/LanguageJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/LanguageJS/src/main/config/compile-js-config.xml
@@ -80,6 +80,10 @@
     </include-classes>
 
     <js-default-initializers>false</js-default-initializers>
+
+    <js-complex-implicit-coercions>false</js-complex-implicit-coercions>
+    <js-resolve-uncertain>false</js-resolve-uncertain>
+    <js-vector-index-checks>false</js-vector-index-checks>
     
 
 </royale-config>
diff --git a/frameworks/js/projects/MXRoyaleJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/MXRoyaleJS/src/main/config/compile-js-config.xml
index 4545499..a5fd3dd 100644
--- a/frameworks/js/projects/MXRoyaleJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/MXRoyaleJS/src/main/config/compile-js-config.xml
@@ -112,6 +112,10 @@
     </include-namespaces>
 
     <js-default-initializers>false</js-default-initializers>
+
+    <js-complex-implicit-coercions>false</js-complex-implicit-coercions>
+    <js-resolve-uncertain>false</js-resolve-uncertain>
+    <js-vector-index-checks>false</js-vector-index-checks>
         
 
 </royale-config>
diff --git a/frameworks/js/projects/MaterialDesignLiteJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/MaterialDesignLiteJS/src/main/config/compile-js-config.xml
index f60dcb0..b85808c 100644
--- a/frameworks/js/projects/MaterialDesignLiteJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/MaterialDesignLiteJS/src/main/config/compile-js-config.xml
@@ -79,4 +79,8 @@
     <uri>library://ns.apache.org/royale/mdl</uri>
   </include-namespaces>
   <js-default-initializers>false</js-default-initializers>
+
+    <js-complex-implicit-coercions>false</js-complex-implicit-coercions>
+    <js-resolve-uncertain>false</js-resolve-uncertain>
+    <js-vector-index-checks>false</js-vector-index-checks>
 </royale-config>
diff --git a/frameworks/js/projects/MobileJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/MobileJS/src/main/config/compile-js-config.xml
index 3b6cc29..ae99374 100644
--- a/frameworks/js/projects/MobileJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/MobileJS/src/main/config/compile-js-config.xml
@@ -106,6 +106,10 @@
     </include-namespaces>
 
     <js-default-initializers>false</js-default-initializers>
+
+    <js-complex-implicit-coercions>false</js-complex-implicit-coercions>
+    <js-resolve-uncertain>false</js-resolve-uncertain>
+    <js-vector-index-checks>false</js-vector-index-checks>
         
 
 </royale-config>
diff --git a/frameworks/js/projects/NetworkJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/NetworkJS/src/main/config/compile-js-config.xml
index b274f50..fe77e09 100644
--- a/frameworks/js/projects/NetworkJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/NetworkJS/src/main/config/compile-js-config.xml
@@ -95,6 +95,10 @@
     </include-namespaces>
 
     <js-default-initializers>false</js-default-initializers>
+
+    <js-complex-implicit-coercions>false</js-complex-implicit-coercions>
+    <js-resolve-uncertain>false</js-resolve-uncertain>
+    <js-vector-index-checks>false</js-vector-index-checks>
         
 
 </royale-config>
diff --git a/frameworks/js/projects/ReflectionJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/ReflectionJS/src/main/config/compile-js-config.xml
index 2087d41..cb2ab8d 100644
--- a/frameworks/js/projects/ReflectionJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/ReflectionJS/src/main/config/compile-js-config.xml
@@ -61,6 +61,7 @@
                  if these swcs are on the external-library-path then their requires
                  will not be listed -->
             <path-element>../../../../../libs/CoreJS.swc</path-element>
+            <path-element>../../../../../libs/LanguageJS.swc</path-element>
         </library-path>
         
         <namespaces>
@@ -81,10 +82,10 @@
     </include-file>
 
     <include-sources>
-        <path-element>../../../../../../projects/Reflection/src/main/royale</path-element>
     </include-sources>
-    
+
     <include-classes>
+        <class>ReflectionClasses</class>
     </include-classes>
     
     <include-namespaces>
@@ -92,6 +93,10 @@
     </include-namespaces>
 
     <js-default-initializers>false</js-default-initializers>
+
+    <js-complex-implicit-coercions>false</js-complex-implicit-coercions>
+    <js-resolve-uncertain>false</js-resolve-uncertain>
+    <js-vector-index-checks>false</js-vector-index-checks>
     
 
 </royale-config>
diff --git a/frameworks/js/projects/RoyaleSiteJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/RoyaleSiteJS/src/main/config/compile-js-config.xml
index 41a1e16..ff7aa0f 100644
--- a/frameworks/js/projects/RoyaleSiteJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/RoyaleSiteJS/src/main/config/compile-js-config.xml
@@ -93,6 +93,10 @@
     </include-namespaces>
 
     <js-default-initializers>false</js-default-initializers>
+
+    <js-complex-implicit-coercions>false</js-complex-implicit-coercions>
+    <js-resolve-uncertain>false</js-resolve-uncertain>
+    <js-vector-index-checks>false</js-vector-index-checks>
         
 
 </royale-config>
diff --git a/frameworks/js/projects/RoyaleUnitJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/RoyaleUnitJS/src/main/config/compile-js-config.xml
index e42a5af..5b0629e 100644
--- a/frameworks/js/projects/RoyaleUnitJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/RoyaleUnitJS/src/main/config/compile-js-config.xml
@@ -86,4 +86,8 @@
     </include-classes>
 
     <js-default-initializers>false</js-default-initializers>
+
+    <js-complex-implicit-coercions>false</js-complex-implicit-coercions>
+    <js-resolve-uncertain>false</js-resolve-uncertain>
+    <js-vector-index-checks>false</js-vector-index-checks>
 </royale-config>
diff --git a/frameworks/js/projects/SparkRoyaleJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/SparkRoyaleJS/src/main/config/compile-js-config.xml
index 664783a..f19bafd 100644
--- a/frameworks/js/projects/SparkRoyaleJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/SparkRoyaleJS/src/main/config/compile-js-config.xml
@@ -111,6 +111,10 @@
     </include-namespaces>
 
     <js-default-initializers>false</js-default-initializers>
+
+    <js-complex-implicit-coercions>false</js-complex-implicit-coercions>
+    <js-resolve-uncertain>false</js-resolve-uncertain>
+    <js-vector-index-checks>false</js-vector-index-checks>
         
 
 </royale-config>
diff --git a/frameworks/js/projects/StorageJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/StorageJS/src/main/config/compile-js-config.xml
index 527fd7a..e25ecba 100644
--- a/frameworks/js/projects/StorageJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/StorageJS/src/main/config/compile-js-config.xml
@@ -98,6 +98,10 @@
     </include-namespaces>
 
     <js-default-initializers>false</js-default-initializers>
+
+    <js-complex-implicit-coercions>false</js-complex-implicit-coercions>
+    <js-resolve-uncertain>false</js-resolve-uncertain>
+    <js-vector-index-checks>false</js-vector-index-checks>
     
 
 </royale-config>
diff --git a/frameworks/js/projects/TLFJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/TLFJS/src/main/config/compile-js-config.xml
index 88e3959..8191d19 100644
--- a/frameworks/js/projects/TLFJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/TLFJS/src/main/config/compile-js-config.xml
@@ -105,6 +105,10 @@
     </include-namespaces>
 
     <js-default-initializers>false</js-default-initializers>
-    
+
+    <js-complex-implicit-coercions>false</js-complex-implicit-coercions>
+    <js-resolve-uncertain>false</js-resolve-uncertain>
+    <js-vector-index-checks>false</js-vector-index-checks>
+    <js-vector-emulation-class>Array</js-vector-emulation-class>
 
 </royale-config>
diff --git a/frameworks/js/projects/TextJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/TextJS/src/main/config/compile-js-config.xml
index d3392e9..2ce62c3 100644
--- a/frameworks/js/projects/TextJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/TextJS/src/main/config/compile-js-config.xml
@@ -99,6 +99,10 @@
     </include-namespaces>
 
     <js-default-initializers>false</js-default-initializers>
+
+    <js-complex-implicit-coercions>false</js-complex-implicit-coercions>
+    <js-resolve-uncertain>false</js-resolve-uncertain>
+    <js-vector-index-checks>false</js-vector-index-checks>
     
 
 </royale-config>
diff --git a/frameworks/js/projects/XMLJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/XMLJS/src/main/config/compile-js-config.xml
index d2e3429..6bce515 100644
--- a/frameworks/js/projects/XMLJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/XMLJS/src/main/config/compile-js-config.xml
@@ -92,6 +92,10 @@
     </include-namespaces>
 
     <js-default-initializers>false</js-default-initializers>
+
+    <js-complex-implicit-coercions>false</js-complex-implicit-coercions>
+    <js-resolve-uncertain>false</js-resolve-uncertain>
+    <js-vector-index-checks>false</js-vector-index-checks>
         
 
 </royale-config>
diff --git a/frameworks/projects/Ace/pom.xml b/frameworks/projects/Ace/pom.xml
index 6591532..98522ba 100644
--- a/frameworks/projects/Ace/pom.xml
+++ b/frameworks/projects/Ace/pom.xml
@@ -58,7 +58,7 @@
           </includeFiles>
           <skipExtern>true</skipExtern>
           <skipAS>${royale.skipAS}</skipAS>
-          <additionalCompilerOptions>-js-default-initializers=false;-source-map=true</additionalCompilerOptions>
+          <additionalCompilerOptions>-js-default-initializers=false;-js-complex-implicit-coercions=false;-js-vector-index-checks=false;-js-resolve-uncertain=false;-source-map=true</additionalCompilerOptions>
         </configuration>
       </plugin>
     </plugins>
diff --git a/frameworks/projects/Basic/pom.xml b/frameworks/projects/Basic/pom.xml
index d366c0c..3ae6fe2 100644
--- a/frameworks/projects/Basic/pom.xml
+++ b/frameworks/projects/Basic/pom.xml
@@ -68,7 +68,7 @@
           <allowSubclassOverrides>true</allowSubclassOverrides>
           <skipExtern>true</skipExtern>
           <skipAS>${royale.skipAS}</skipAS>
-          <additionalCompilerOptions>-js-default-initializers=false;-source-map=true;-compiler.fxg-base-class=flash.display.Sprite</additionalCompilerOptions>
+          <additionalCompilerOptions>-js-default-initializers=false;-js-complex-implicit-coercions=false;-js-vector-index-checks=false;-js-resolve-uncertain=false;-source-map=true;-compiler.fxg-base-class=flash.display.Sprite</additionalCompilerOptions>
         </configuration>
       </plugin>
     </plugins>
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/UIBase.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/UIBase.as
index 613c940..a9f9f52 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/UIBase.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/UIBase.as
@@ -904,43 +904,6 @@ package org.apache.royale.core
         {
             return element.childNodes as Array;
         }
-        
-        COMPILE::SWF
-		private var _model:IBeadModel;
-
-        /**
-         *  An IBeadModel that serves as the data model for the component.
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion Royale 0.0
-         */
-        COMPILE::SWF
-        public function get model():Object
-		{
-            if (_model == null)
-            {
-                // addbead will set _model
-                addBead(new (ValuesManager.valuesImpl.getValue(this, "iBeadModel")) as IBead);
-            }
-			return _model;
-		}
-
-        COMPILE::SWF
-        /**
-         * @private
-         * @royaleignorecoercion org.apache.royale.core.IBead
-         */
-        [Bindable("modelChanged")]
-		public function set model(value:Object):void
-		{
-			if (_model != value)
-			{
-				addBead(value as IBead);
-				dispatchEvent(new Event("modelChanged"));
-			}
-		}
 		
         private var _view:IBeadView;
         
@@ -1157,8 +1120,6 @@ package org.apache.royale.core
          */
 		public var beads:Array;
 		
-        COMPILE::SWF
-		private var _beads:Vector.<IBead>;
         
         /**
          *  @copy org.apache.royale.core.IStrand#addBead()
@@ -1173,17 +1134,12 @@ package org.apache.royale.core
 		override public function addBead(bead:IBead):void
 		{
             var isView:Boolean;
-			if (!_beads)
-				_beads = new Vector.<IBead>;
-			_beads.push(bead);
-			if (bead is IBeadModel)
-				_model = bead as IBeadModel;
-            else if (bead is IBeadView)
-            {
-                _view = bead as IBeadView;
-                isView = true
-            }
-			bead.strand = this;
+			
+			super.addBead(bead);
+			if (this._model !== bead && bead is IBeadView) {
+				_view = bead as IBeadView;
+				isView = true
+			}
 			
 			if (isView) {
 				dispatchEvent(new Event("viewChanged"));
@@ -1191,49 +1147,6 @@ package org.apache.royale.core
 		}
 		
         /**
-         *  @copy org.apache.royale.core.IStrand#getBeadByType()
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion Royale 0.0
-         */
-        COMPILE::SWF
-		public function getBeadByType(classOrInterface:Class):IBead
-		{
-			for each (var bead:IBead in _beads)
-			{
-				if (bead is classOrInterface)
-					return bead;
-			}
-			return null;
-		}
-		
-        /**
-         *  @copy org.apache.royale.core.IStrand#removeBead()
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion Royale 0.0
-         */
-        COMPILE::SWF
-		public function removeBead(value:IBead):IBead	
-		{
-			var n:int = _beads.length;
-			for (var i:int = 0; i < n; i++)
-			{
-				var bead:IBead = _beads[i];
-				if (bead == value)
-				{
-					_beads.splice(i, 1);
-					return bead;
-				}
-			}
-			return null;
-		}
-		
-        /**
          *  @copy org.apache.royale.core.IParent#addElement()
          * 
          *  @langversion 3.0
diff --git a/frameworks/projects/Binding/pom.xml b/frameworks/projects/Binding/pom.xml
index 3458ef7..18e207f 100644
--- a/frameworks/projects/Binding/pom.xml
+++ b/frameworks/projects/Binding/pom.xml
@@ -50,7 +50,7 @@
           <includeSources>true</includeSources>
           <skipExtern>true</skipExtern>
           <skipAS>${royale.skipAS}</skipAS>
-          <additionalCompilerOptions>-js-default-initializers=false;-source-map=true</additionalCompilerOptions>
+          <additionalCompilerOptions>-js-default-initializers=false;-js-complex-implicit-coercions=false;-js-vector-index-checks=false;-js-resolve-uncertain=false;-source-map=true</additionalCompilerOptions>
         </configuration>
       </plugin>
     </plugins>
diff --git a/frameworks/projects/Charts/pom.xml b/frameworks/projects/Charts/pom.xml
index e12c88e..08a3700 100644
--- a/frameworks/projects/Charts/pom.xml
+++ b/frameworks/projects/Charts/pom.xml
@@ -58,7 +58,7 @@
           </includeFiles>
           <skipExtern>true</skipExtern>
           <skipAS>${royale.skipAS}</skipAS>
-          <additionalCompilerOptions>-js-default-initializers=false;-source-map=true</additionalCompilerOptions>
+          <additionalCompilerOptions>-js-default-initializers=false;-js-complex-implicit-coercions=false;-js-vector-index-checks=false;-js-resolve-uncertain=false;-source-map=true</additionalCompilerOptions>
         </configuration>
       </plugin>
     </plugins>
diff --git a/frameworks/projects/Collections/pom.xml b/frameworks/projects/Collections/pom.xml
index 4a9c0cc..109caa4 100644
--- a/frameworks/projects/Collections/pom.xml
+++ b/frameworks/projects/Collections/pom.xml
@@ -52,7 +52,7 @@
           </includeClasses>
           <skipExtern>true</skipExtern>
           <skipAS>${royale.skipAS}</skipAS>
-          <additionalCompilerOptions>-js-default-initializers=false;-source-map=true</additionalCompilerOptions>
+          <additionalCompilerOptions>-js-default-initializers=false;-js-complex-implicit-coercions=false;-js-vector-index-checks=false;-js-resolve-uncertain=false;-source-map=true</additionalCompilerOptions>
         </configuration>
       </plugin>
     </plugins>
diff --git a/frameworks/projects/Core/pom.xml b/frameworks/projects/Core/pom.xml
index 44d3302..cb158df 100644
--- a/frameworks/projects/Core/pom.xml
+++ b/frameworks/projects/Core/pom.xml
@@ -53,7 +53,14 @@
           <skipExtern>true</skipExtern>
           <skipAS>${royale.skipAS}</skipAS>
           <allowSubclassOverrides>true</allowSubclassOverrides>
-          <additionalCompilerOptions>-allow-abstract-classes;-js-default-initializers=false;-source-map=true</additionalCompilerOptions>
+          <additionalCompilerOptions>
+            -allow-abstract-classes;
+            -js-default-initializers=false;
+            -js-complex-implicit-coercions=false;
+            -js-vector-index-checks=false;
+            -js-resolve-uncertain=false;
+            -source-map=true;
+          </additionalCompilerOptions>
         </configuration>
         <!-- As a test, add asdoc generation to the compile step -->
         <executions>
diff --git a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/HTMLElementWrapper.as b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/HTMLElementWrapper.as
index 4ebff5a..85e5597 100644
--- a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/HTMLElementWrapper.as
+++ b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/HTMLElementWrapper.as
@@ -23,6 +23,7 @@ package org.apache.royale.core
     COMPILE::SWF
     {
         import flash.display.Sprite;
+        import org.apache.royale.events.Event;
     }
         
     COMPILE::JS
@@ -35,18 +36,110 @@ package org.apache.royale.core
         import goog.events;
         import goog.events.BrowserEvent;
         import goog.events.EventTarget;
+        import goog.DEBUG;
         import org.apache.royale.events.utils.EventUtils;
     }
 
     COMPILE::SWF
-    public class HTMLElementWrapper extends Sprite
+    public class HTMLElementWrapper extends Sprite implements IStrand, IEventDispatcher
     {
+        
+        private var _beads:Vector.<IBead>;
+    
         /**
-         * "abstract" method so we can override in JS
          * @param bead The new bead.
          */
         public function addBead(bead:IBead):void
-        {            
+        {
+            if (!_beads)
+            {
+                _beads = new Vector.<IBead>();
+            }
+            _beads.push(bead);
+        
+            if (bead is IBeadModel)
+            {
+                _model = bead as IBeadModel;
+            }
+        
+            bead.strand = this;
+        }
+    
+        /**
+         *  @copy org.apache.royale.core.IStrand#getBeadByType()
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+        public function getBeadByType(classOrInterface:Class):IBead
+        {
+            for each (var bead:IBead in _beads)
+            {
+                if (bead is classOrInterface)
+                    return bead;
+            }
+            return null;
+        }
+    
+    
+        /**
+         *  @copy org.apache.royale.core.IStrand#removeBead()
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.0
+         */
+        public function removeBead(value:IBead):IBead
+        {
+            var n:int = _beads.length;
+            for (var i:int = 0; i < n; i++)
+            {
+                var bead:IBead = _beads[i];
+                if (bead == value)
+                {
+                    _beads.splice(i, 1);
+                    return bead;
+                }
+            }
+            return null;
+        }
+    
+    
+    
+        /**
+         * allow access from overrides
+         */
+        protected var _model:IBeadModel;
+    
+        /**
+         * @royaleignorecoercion Class
+         * @royaleignorecoercion org.apache.royale.core.IBeadModel
+         */
+        public function get model():Object
+        {
+            if (_model == null)
+            {
+                // addbead will set _model
+                addBead(new (ValuesManager.valuesImpl.getValue(this, "iBeadModel")) as IBead);
+            }
+            return _model;
+        }
+    
+        /**
+         * @private
+         * @royaleignorecoercion org.apache.royale.core.IBead
+         */
+        [Bindable("modelChanged")]
+        public function set model(value:Object):void
+        {
+            if (_model != value)
+            {
+                addBead(value as IBead);
+                dispatchEvent(new Event("modelChanged"));
+            }
         }
     }
     
@@ -132,7 +225,7 @@ package org.apache.royale.core
         /**
          * allow access from overrides
          */
-		protected var _model:Object;
+		protected var _model:IBeadModel;
         
         /**
          * @royaleignorecoercion Class 
@@ -153,6 +246,7 @@ package org.apache.royale.core
         
         /**
          * @royaleignorecoercion org.apache.royale.core.IBead
+         * @royaleignorecoercion org.apache.royale.core.IBeadModel
          */
         [Bindable("modelChanged")]
         public function set model(value:Object):void
@@ -162,12 +256,12 @@ package org.apache.royale.core
                 if (value is IBead)
                     addBead(value as IBead);
                 else
-                    _model = value;
+                    _model = IBeadModel(value);
                 dispatchEvent(new org.apache.royale.events.Event("modelChanged"));
             }
         }
-
-		protected var _beads:Vector.<IBead>;
+        
+		private var _beads:Array;
         
 		//--------------------------------------
 		//   Function
@@ -181,9 +275,9 @@ package org.apache.royale.core
 		{
 			if (!_beads)
 			{
-				_beads = new Vector.<IBead>();
+				_beads = [];
 			}
-
+            if (goog.DEBUG && !(bead is IBead)) throw new TypeError('Cannot convert '+bead+' to IBead')
 			_beads.push(bead);
 
 			if (bead is IBeadModel)
diff --git a/frameworks/projects/Core/src/test/royale/flexUnitTests/CoreTester.as b/frameworks/projects/Core/src/test/royale/flexUnitTests/CoreTester.as
index 42ba4fa..088a563 100644
--- a/frameworks/projects/Core/src/test/royale/flexUnitTests/CoreTester.as
+++ b/frameworks/projects/Core/src/test/royale/flexUnitTests/CoreTester.as
@@ -18,10 +18,21 @@
 ////////////////////////////////////////////////////////////////////////////////
 package flexUnitTests
 {
+    import flexUnitTests.language.*
+    
     [Suite]
     [RunWith("org.apache.royale.test.runners.SuiteRunner")]
     public class CoreTester
     {
+        
+        //language tests
+        public var languageTestIs:LanguageTesterTestIs;
+        public var languageTestIntUint:LanguageTesterIntUint;
+        public var languageTestVector:LanguageTesterTestVector;
+        public var languageTestClass:LanguageTesterTestClass;
+        
+        
+        //core tests
         public var strandTesterTest:StrandTesterTest;
 		public var binaryDataTesterTest:BinaryDataTesterTest;
 		public var arrayUtilsTest:ArrayUtilsTest;
diff --git a/frameworks/projects/Core/src/test/royale/flexUnitTests/language/LanguageTesterIntUint.as b/frameworks/projects/Core/src/test/royale/flexUnitTests/language/LanguageTesterIntUint.as
new file mode 100644
index 0000000..4d5d1cc
--- /dev/null
+++ b/frameworks/projects/Core/src/test/royale/flexUnitTests/language/LanguageTesterIntUint.as
@@ -0,0 +1,164 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 flexUnitTests.language
+{
+    
+    
+    import org.apache.royale.test.asserts.*;
+    
+    import flexUnitTests.language.support.*;
+    
+    /**
+     * @royalesuppresspublicvarwarning
+     */
+    public class LanguageTesterIntUint
+    {
+    
+        public static var isJS:Boolean = COMPILE::JS;
+    
+    
+        [BeforeClass]
+        public static function setUpBeforeClass():void
+        {
+        }
+        
+        [AfterClass]
+        public static function tearDownAfterClass():void
+        {
+        }
+        
+        [Before]
+        public function setUp():void
+        {
+        
+        }
+        
+        [After]
+        public function tearDown():void
+        {
+        }
+        
+        
+        [Test]
+        public function testNumerics():void
+        {
+            var val1:Number = 2.5;
+            var val2:Number = 2;
+            var var3:String = '';
+            var var4:String = '0';
+            var var5:String = '2';
+            
+            var clazz:Class = int;
+            var intVal:int = (val1 as int);
+            assertTrue( intVal == 0,'Unexpected int check');
+            
+            intVal = (var3 as int);
+            assertTrue( intVal == 0,'Unexpected int check');
+            intVal = (var4 as int);
+            assertTrue( intVal == 0,'Unexpected int check');
+            intVal = (var5 as int);
+            assertTrue( intVal == 0,'Unexpected int check');
+            
+            intVal = int(var3);
+            assertTrue( intVal == 0,'Unexpected int check');
+            intVal = int(var4);
+            assertTrue( intVal == 0,'Unexpected int check');
+            intVal = int(var5);
+            assertTrue( intVal == 2,'Unexpected int check');
+            
+            intVal = new int(var3);
+            assertTrue( intVal == 0,'Unexpected int check');
+            intVal = new int(var4);
+            assertTrue( intVal == 0,'Unexpected int check');
+            intVal = new int(var5);
+            assertTrue( intVal == 2,'Unexpected int check');
+            
+            
+            assertFalse( val1 is int,'int check should be false');
+            assertTrue( val2 is int,'int check should be true');
+            
+            assertFalse( val1 is uint,'uint check should be false');
+            assertTrue( val2 is uint,'uint check should be true');
+            
+            var dyn:* = new clazz();
+            
+            assertTrue( dyn == 0,'Unexpected int check');
+            assertTrue( dyn === 0,'Unexpected int check');
+            
+            
+            assertTrue( int === int,'random check');
+            
+            assertTrue( new clazz(3.5) == 3,'Unexpected int check');
+            
+            assertFalse( dyn !== 0,'Unexpected int check');
+            dyn = new clazz(3.5);
+            intVal = dyn;
+            assertTrue( intVal === 3,'Unexpected int check');
+            assertTrue( new clazz(3.5) === 3,'Unexpected int check');
+            
+            //extra indirection
+            var dynInt:* = var5;
+            
+            assertFalse( dynInt is clazz,'Unexpected int check');
+            assertNull( dynInt as clazz,'Unexpected int check');
+            assertTrue( clazz(dynInt) === 2,'Unexpected int check');
+        }
+        
+        
+        [Test]
+        public function testUntypedMath():void
+        {
+            var val:int = 30;
+            var c:Class = int;
+            var untyped:* = val;
+            var untyped2:* = new c(30);
+            var untyped3:Object = new c(30);
+            assertTrue( untyped3 == 30,'Unexpected int check');
+            assertTrue( untyped3 === 30,'Unexpected int check');
+            
+            val += 1.5;
+            untyped += 1.5;
+            untyped2 += 1.5;
+            assertTrue( val == 31,'Unexpected int check');
+            assertTrue( val === 31,'Unexpected int check');
+            
+            assertTrue( untyped == 31.5,'Unexpected int check');
+            assertTrue( untyped === 31.5,'Unexpected int check');
+            
+            assertTrue( untyped2 == 31.5,'Unexpected int check');
+            assertTrue( untyped2 === 31.5,'Unexpected int check');
+            
+            untyped = new Number(30);
+            assertTrue( untyped == 30,'Unexpected Number check');
+            assertTrue( untyped === 30,'Unexpected Number check');
+            
+            var numClass:Class = Number;
+            untyped = new numClass(30);
+            assertTrue( untyped == 30,'Unexpected Number check');
+            assertTrue( untyped === 30,'Unexpected Number check');
+            assertTrue( 30 === untyped,'Unexpected Number check');
+            
+            untyped += 1.5;
+            assertTrue( untyped == 31.5,'Unexpected Number check');
+            assertTrue( untyped === 31.5,'Unexpected Number check');
+            
+        }
+        
+    }
+}
diff --git a/frameworks/projects/Core/src/test/royale/flexUnitTests/language/LanguageTesterTestClass.as b/frameworks/projects/Core/src/test/royale/flexUnitTests/language/LanguageTesterTestClass.as
new file mode 100644
index 0000000..17fb667
--- /dev/null
+++ b/frameworks/projects/Core/src/test/royale/flexUnitTests/language/LanguageTesterTestClass.as
@@ -0,0 +1,344 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 flexUnitTests.language
+{
+    
+    
+    import org.apache.royale.test.asserts.*;
+    
+    import flexUnitTests.language.support.*;
+    
+    /**
+     * @royalesuppresspublicvarwarning
+     */
+    public class LanguageTesterTestClass
+    {
+    
+        public static var isJS:Boolean = COMPILE::JS;
+        
+        [BeforeClass]
+        public static function setUpBeforeClass():void
+        {
+
+        }
+        
+        [AfterClass]
+        public static function tearDownAfterClass():void
+        {
+        }
+        
+        [Before]
+        public function setUp():void
+        {
+        
+        }
+        
+        [After]
+        public function tearDown():void
+        {
+        }
+    
+        [Test]
+        public function testNoConstruct():void
+        {
+            var c:Class = Class;
+            var err:Boolean = false;
+            try {
+                var a:* = new c();
+            } catch(e:Error) {
+                err = true;
+            }
+            
+            assertTrue( err,'Class constructor call should throw error');
+    
+        }
+    
+    
+        [Test]
+        public function testDistinctType():void
+        {
+            var classType:* = Class;
+            assertFalse( classType == Object,'Class should be distinct from Object');
+        }
+    
+    
+        [Test]
+        public function testNullishCoercions():void
+        {
+            var n:* = undefined;
+            
+            assertNull( Class(n),'Class coercion of undefined should return null');
+            
+            n = null;
+    
+            assertNull( Class(n),'Class  coercion of null should return null');
+        }
+        
+        
+        [Test]
+        public function testNative():void
+        {
+           var n:* = Number;
+           var nVal:* = 1;
+           var c:Class; 
+            
+           assertTrue( Number is Class,'Number is Class should be true');
+           assertTrue( n is Class,'Number is Class should be true');
+    
+           assertFalse( nVal is Class,'Number value is Class should be false');
+    
+            var err:Boolean = false;
+            try {
+                c = Class(n)
+            } catch(e:Error) {
+                err = true;
+            }
+            assertFalse( err,'Number is Class should be true');
+            assertEquals( c, Number,'c should be Number');
+            
+            err = false;
+            c = Class;
+            try {
+                c = c(n)
+            } catch(e:Error) {
+                err = true;
+            }
+            assertFalse( err,'Number is Class should be true');
+            assertEquals( c, Number,'c should be Number');
+    
+            err = false;
+            try {
+                c = Class(nVal)
+            } catch(e:Error) {
+                err = true;
+            }
+            assertTrue( err,'Number value Class coercion should throw error');
+
+            err = false;
+            c = Class;
+            try {
+                c = c(nVal)
+            } catch(e:Error) {
+                err = true;
+            }
+            assertTrue( err,'Number value Class coercion should throw error');
+            
+        }
+    
+    
+        [Test]
+        public function testNative2():void
+        {
+            var n:* = Array;
+            var nVal:* = [];
+            var c:Class;
+        
+            assertTrue( Array is Class,'Array is Class should be true');
+            assertTrue( n is Class,'Array is Class should be true');
+        
+            assertFalse( nVal is Class,'Array value is Class should be false');
+        
+            var err:Boolean = false;
+            try {
+                c = Class(n)
+            } catch(e:Error) {
+                err = true;
+            }
+            assertFalse( err,'Array is Class should be true');
+            assertEquals( c, Array,'c should be Array');
+        
+            err = false;
+            c = Class;
+            try {
+                c = c(n)
+            } catch(e:Error) {
+                err = true;
+            }
+            assertFalse( err,'Array is Class should be true');
+            assertEquals( c, Array,'c should be Array');
+        
+            err = false;
+            try {
+                c = Class(nVal)
+            } catch(e:Error) {
+                err = true;
+            }
+            assertTrue( err,'Array value Class coercion should throw error');
+        
+            err = false;
+            c = Class;
+            try {
+                c = c(nVal)
+            } catch(e:Error) {
+                err = true;
+            }
+            assertTrue( err,'Array value Class coercion should throw error');
+        
+        }
+    
+        [Test]
+        public function testJSSynthetic():void
+        {
+            var n:* = uint;
+            var nVal:* = new n();
+            var c:Class;
+        
+            assertTrue( uint is Class,'uint is Class should be true');
+            assertTrue( n is Class,'uint is Class should be true');
+        
+            assertFalse( nVal is Class,'uint val is Class should be false ');
+        
+            var err:Boolean = false;
+            try {
+                c = Class(n)
+            } catch(e:Error) {
+                err = true;
+            }
+            assertFalse( err,'uint Class coercion should succeed');
+            assertEquals( c, uint,'c should be uint');
+        
+            err = false;
+            c = Class;
+            try {
+                c = c(n)
+            } catch(e:Error) {
+                err = true;
+            }
+            assertFalse( err,'uint Class coercion should succeed');
+            assertEquals( c, uint,'c should be uint');
+        
+            err = false;
+            try {
+                c = Class(nVal)
+            } catch(e:Error) {
+                err = true;
+            }
+            assertTrue( err,'uint value Class coercion should throw error');
+        
+            err = false;
+            c = Class;
+            try {
+                c = c(nVal)
+            } catch(e:Error) {
+                err = true;
+            }
+            assertTrue( err,'uint value Class coercion should throw error');
+        }
+    
+    
+        [Test]
+        public function testRoyaleClass():void
+        {
+            var n:* = TestClass1;
+            var nVal:* = new TestClass1();
+            var c:Class;
+        
+            assertTrue( TestClass1 is Class,'TestClass1 is Class should be true');
+            assertTrue( n is Class,'TestClass1 is Class should be true');
+        
+            assertFalse( nVal is Class,'TestClass1 val is Class should be false ');
+        
+            var err:Boolean = false;
+            try {
+                c = Class(n)
+            } catch(e:Error) {
+                err = true;
+            }
+            assertFalse( err,'TestClass1 Class coercion should succeed');
+            assertEquals( c, TestClass1,'c should be TestClass1');
+        
+            err = false;
+            c = Class;
+            try {
+                c = c(n)
+            } catch(e:Error) {
+                err = true;
+            }
+            assertFalse( err,'TestClass1 Class coercion should succeed');
+            assertEquals( c, TestClass1,'c should be TestClass1');
+        
+            err = false;
+            try {
+                c = Class(nVal)
+            } catch(e:Error) {
+                err = true;
+            }
+            assertTrue( err,'TestClass1 value Class coercion should throw error');
+        
+            err = false;
+            c = Class;
+            try {
+                c = c(nVal)
+            } catch(e:Error) {
+                err = true;
+            }
+            assertTrue( err,'TestClass1 value Class coercion should throw error');
+        }
+    
+    
+        [Test]
+        public function testRoyaleInterface():void
+        {
+            var n:* = ITestInterface;
+            var c:Class;
+            //strange, perhaps, but true:
+            assertTrue( n is Class,'ITestInterface is Class should be true');
+            
+            var err:Boolean = false;
+            try {
+                c = Class(n)
+            } catch(e:Error) {
+                err = true;
+            }
+            //ditto:
+            assertFalse( err,'ITestInterface Class coercion should not throw error');
+        }
+    
+    
+        [Test]
+        public function testFunction():void
+        {
+            var n:* = testRoyaleInterface;
+            var c:Class;
+            assertFalse( n is Class,'method (function) is Class should be false');
+        
+            var err:Boolean = false;
+            try {
+                c = Class(n)
+            } catch(e:Error) {
+                err = true;
+            }
+
+            assertTrue( err,'method (function) Class coercion should throw error');
+            
+            //local function
+            n = function():void{};
+            assertFalse( n is Class,'local function is Class should be false');
+    
+            err = false;
+            try {
+                c = Class(n)
+            } catch(e:Error) {
+                err = true;
+            }
+            assertTrue( err,'local function Class coercion should throw error');
+        }
+        
+    }
+}
diff --git a/frameworks/projects/Core/src/test/royale/flexUnitTests/language/LanguageTesterTestIs.as b/frameworks/projects/Core/src/test/royale/flexUnitTests/language/LanguageTesterTestIs.as
new file mode 100644
index 0000000..f17203e
--- /dev/null
+++ b/frameworks/projects/Core/src/test/royale/flexUnitTests/language/LanguageTesterTestIs.as
@@ -0,0 +1,245 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 flexUnitTests.language
+{
+    
+    
+    import org.apache.royale.test.asserts.*;
+    
+    import flexUnitTests.language.support.*;
+    
+    /**
+     * @royalesuppresspublicvarwarning
+     */
+    public class LanguageTesterTestIs
+    {
+    
+        public static var isJS:Boolean = COMPILE::JS;
+        
+        [BeforeClass]
+        public static function setUpBeforeClass():void
+        {
+
+        }
+        
+        [AfterClass]
+        public static function tearDownAfterClass():void
+        {
+        }
+        
+        [Before]
+        public function setUp():void
+        {
+        }
+        
+        [After]
+        public function tearDown():void
+        {
+        }
+        
+        
+        [Test]
+        public function testIsOwnType():void
+        {
+            var test1:TestClass1 = new TestClass1();
+            assertTrue(  test1 is TestClass1,'Unexpected instance is {Class} check');
+        }
+        
+        [Test]
+        public function testIsAncestorType():void
+        {
+            var test2:TestClass2 = new TestClass2();
+            assertTrue(  test2 is TestClass1,'Unexpected instance is {AncestorClass} check');
+        }
+        
+        [Test]
+        public function testIsDistantAncestorType():void
+        {
+            var test4:TestClass4 = new TestClass4();
+            assertTrue( test4 is TestClass1,'Unexpected instance is {DistantAncestorClass} check');
+        }
+        
+        
+        [Test]
+        public function testIsImplementedInterface():void
+        {
+            var test1:TestClass1 = new TestClass1();
+            assertTrue( test1 is ITestInterface,'Unexpected instance is {OwnInterface} check');
+        }
+        
+        
+        [Test]
+        public function testIsAncestorInterface():void
+        {
+            var test2:TestClass2 = new TestClass2();
+            assertTrue( test2 is ITestInterface,'Unexpected instance is {AncestorInterface} check');
+        }
+        
+        [Test]
+        public function testIsImplementedInterfaceAncestor():void
+        {
+            var test3:TestClass3 = new TestClass3();
+            assertTrue( test3 is ITestInterface,'Unexpected instance is {InterfaceAncestor} check');
+            
+        }
+        
+        [Test]
+        public function testIsImplementedInterfaceAncestor2():void
+        {
+            var test4:TestClass4 = new TestClass4();
+            assertTrue( test4 is ITestInterface,'Unexpected instance is {InterfaceAncestor} check');
+        }
+        
+        
+        [Test]
+        public function testNullCoercion():void
+        {
+            var val:Object = null;
+            
+            var s:String = String(val);
+            assertEquals( s, 'null','Unexpected coercion check');
+            var i:int = int(val);
+            assertTrue( i === 0,'Unexpected coercion check');
+            var u:uint = uint(val);
+            assertTrue( u === 0,'Unexpected coercion check');
+            var n:Number = Number(val);
+            assertTrue( n === 0,'Unexpected coercion check');
+            var b:Boolean = Boolean(val);
+            assertTrue( b === false,'Unexpected coercion check');
+            
+            var t:TestClass1 = TestClass1(val);
+            assertTrue( t === null,'Unexpected coercion check');
+            
+            //with indirection
+            var c:Class = String;
+            var result:* = c(val);
+            assertTrue( result === 'null','Unexpected coercion check');
+            c = int;
+            result = c(val);
+            assertTrue( result === 0,'Unexpected coercion check');
+            c = uint;
+            result = c(val);
+            assertTrue( result === 0,'Unexpected coercion check');
+            c = Number;
+            result = c(val);
+            assertTrue( result === 0,'Unexpected coercion check');
+            
+            c = Boolean;
+            result = c(val);
+            assertTrue( result === false,'Unexpected coercion check');
+            
+            c = TestClass1;
+            result = c(val);
+            assertTrue( result === null,'Unexpected coercion check');
+        }
+        
+        [Test]
+        public function testObjectCoercion():void
+        {
+            assertTrue( Object(undefined) != null,'Unexpected null check');
+            assertTrue( Object(null) != null,'Unexpected null check');
+            assertTrue( Object('test') === 'test','Unexpected null check');
+            assertTrue( Object(1) === 1,'Unexpected null check');
+            assertTrue( Object(false) === false,'Unexpected null check');
+            assertTrue( Object(true) === true,'Unexpected null check');
+            var indirection:* = undefined;
+            assertTrue( Object(indirection) != null,'Unexpected null check');
+            indirection = null;
+            assertTrue( Object(indirection) != null,'Unexpected null check');
+            indirection = 'test';
+            assertTrue( Object(indirection) === 'test','Unexpected null check');
+            indirection = 1;
+            assertTrue( Object(indirection) === 1,'Unexpected null check');
+            indirection = false;
+            assertTrue( Object(indirection) === false,'Unexpected null check');
+            indirection = true;
+            assertTrue( Object(indirection) === true,'Unexpected null check');
+            var dynObjectClass:Class = Object;
+            //regular indirect coercion
+            indirection = undefined;
+            assertTrue( dynObjectClass(indirection) != null,'Unexpected null check');
+            indirection = null;
+            assertTrue( dynObjectClass(indirection) != null,'Unexpected null check');
+            indirection = 'test';
+            assertTrue( dynObjectClass(indirection) === 'test','Unexpected null check');
+            indirection = 1;
+            assertTrue( dynObjectClass(indirection) === 1,'Unexpected null check');
+            indirection = false;
+            assertTrue( dynObjectClass(indirection) === false,'Unexpected null check');
+            indirection = true;
+            assertTrue( dynObjectClass(indirection) === true,'Unexpected null check');
+            //no need to test 'new Object(something)' as it is not permitted explicitly in actionscript
+            //but it can be achieved via indirection:
+            var dynObject:Class = Object;
+            indirection = undefined;
+            assertTrue( new dynObject(indirection) != null,'Unexpected null check');
+            indirection = null;
+            assertTrue( new dynObject(indirection) != null,'Unexpected null check');
+            indirection = 'test';
+            assertTrue( new dynObject(indirection) === 'test','Unexpected null check');
+            indirection = 1;
+            assertTrue( new dynObject(indirection) === 1,'Unexpected null check');
+            indirection = false;
+            assertTrue( new dynObject(indirection) === false,'Unexpected null check');
+            indirection = true;
+            assertTrue( new dynObject(indirection) === true,'Unexpected null check');
+            
+        }
+        
+        [Test]
+        public function testImplicitCoercion():void
+        {
+            var testclass2Class:Class = TestClass2;
+            var testClass3:TestClass3;
+            var caughtError:Boolean;
+            try
+            {
+                caughtError = false;
+                testClass3 = new testclass2Class();
+            } catch (e:Error)
+            {
+                caughtError = e is TypeError
+            }
+            
+            assertTrue( caughtError,'Unexpected coercion check');
+            assertTrue( testClass3 == null,'Unexpected coercion check');
+        }
+        
+        [Test]
+        public function testNullUndefined():void
+        {
+            assertTrue( null == null,'Unexpected null check');
+            assertTrue( null == undefined,'Unexpected null check');
+            assertTrue( null === null,'Unexpected null check');
+            assertTrue( undefined === undefined,'Unexpected undefined check');
+            assertFalse( undefined === null,'Unexpected null/undefined check');
+        }
+        
+        [Test]
+        public function testString():void
+        {
+            assertTrue( String('test') == 'test','Unexpected string check');
+            assertTrue( String('test') === 'test','Unexpected string check');
+            assertTrue( new String('test') == 'test','Unexpected string check');
+            assertTrue( new String('test') === 'test','Unexpected string check');
+        }
+        
+        
+    }
+}
diff --git a/frameworks/projects/Core/src/test/royale/flexUnitTests/language/LanguageTesterTestVector.as b/frameworks/projects/Core/src/test/royale/flexUnitTests/language/LanguageTesterTestVector.as
new file mode 100644
index 0000000..62d3990
--- /dev/null
+++ b/frameworks/projects/Core/src/test/royale/flexUnitTests/language/LanguageTesterTestVector.as
@@ -0,0 +1,1409 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 flexUnitTests.language
+{
+    
+    import org.apache.royale.test.asserts.*;
+    import flexUnitTests.language.support.*;
+    
+    
+    /**
+     * @royalesuppresspublicvarwarning
+     */
+    public class LanguageTesterTestVector
+    {
+        
+        public static var isJS:Boolean = COMPILE::JS;
+    
+    
+        public static function hasInsertAtRemoveAt():Boolean{
+            //this checks the build for swf-version that has insertAt/removeAt support in Vector
+            COMPILE::SWF{
+                //see; http://fpdownload.macromedia.com/pub/labs/flashruntimes/shared/air19_flashplayer19_releasenotes.pdf
+                // "Please use swf-version 30 or greater and namespace 19.0 or greater to access the new APIs."
+                //return RoyaleUnitTestRunner.swfVersion >= 30;
+                
+                return false;
+            }
+            COMPILE::JS {
+                //always supported
+                return true
+            }
+        }
+        
+        [BeforeClass]
+        public static function setUpBeforeClass():void
+        {
+
+        }
+        
+        [AfterClass]
+        public static function tearDownAfterClass():void
+        {
+        }
+        
+        [Before]
+        public function setUp():void
+        {
+        }
+        
+        [After]
+        public function tearDown():void
+        {
+        }
+        
+        
+        private function _mapper(item:Object, index:int, vector:Vector.<*>):Object
+        {
+            return new TestClass1();
+        }
+        
+        [Test]
+        public function testVectorBasic():void
+        {
+            
+            var vi:Vector.<int> = new Vector.<int>();
+            
+            assertFalse( vi.fixed,'Unexpected Vector check');
+            assertTrue( vi.length == 0,'Unexpected Vector check');
+            
+            vi = new Vector.<int>(20);
+            
+            assertFalse( vi.fixed,'Unexpected Vector check');
+            assertTrue( vi.length == 20,'Unexpected Vector check');
+            assertEquals( vi.toString(),'0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0','Unexpected Vector check');
+            
+            vi = new Vector.<int>(20, true);
+            
+            assertTrue( vi.fixed,'Unexpected Vector check');
+            assertTrue( vi.length == 20,'Unexpected Vector check');
+            assertEquals( vi.toString(),'0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0','Unexpected Vector check');
+            
+            var c:Class = Vector.<int>;
+            
+            //dynamic instantiation
+            var n:* = new c();
+            n.push(12);
+            n.push(24);
+            assertFalse( n.fixed,'Unexpected Vector check');
+            assertTrue( n.length == 2,'Unexpected Vector check');
+            assertEquals( n.toString(),'12,24','Unexpected Vector check');
+            
+            n = new c(20);
+            assertFalse( n.fixed,'Unexpected Vector check');
+            assertTrue( n.length == 20,'Unexpected Vector check');
+            assertEquals( n.toString(),'0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0','Unexpected Vector check');
+            
+            n = new c(20, true);
+            assertTrue( n.fixed,'Unexpected Vector check');
+            assertTrue( n.length == 20,'Unexpected Vector check');
+            assertEquals( n.toString(),'0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0','Unexpected Vector check');
+            
+            var source:Array = [1, '', false, NaN, {test: true}, undefined];
+            
+            //coercion
+            vi = Vector.<int>(source);
+            assertFalse( vi.fixed,'Unexpected Vector check');
+            assertTrue( vi.length == 6,'Unexpected Vector check');
+            assertEquals( vi.toString(),'1,0,0,0,0,0','Unexpected Vector check');
+            
+            var vb:Vector.<Boolean> = Vector.<Boolean>(source);
+            assertFalse( vb.fixed,'Unexpected Vector check');
+            assertTrue( vb.length == 6,'Unexpected Vector check');
+            assertEquals( vb.toString(),'true,false,false,false,true,false','Unexpected Vector check');
+            
+            n = vb;
+            assertFalse( n is Vector,'Unexpected Vector check');
+            assertFalse( n is Array,'Unexpected Vector check');
+            assertTrue( n is Vector.<Boolean>,'Unexpected Vector check');
+            
+            var vs:Vector.<String> = Vector.<String>(source);
+            
+            assertFalse( vs.fixed,'Unexpected Vector check');
+            assertTrue( vs.length == 6,'Unexpected Vector check');
+            assertEquals( vs.toString(),'1,,false,NaN,[object Object],null','Unexpected Vector check');
+            
+            var vstar:Vector.<*> = Vector.<*>(source);
+            
+            assertFalse( vstar.fixed,'Unexpected Vector check');
+            assertTrue( vstar.length == 6,'Unexpected Vector check');
+            assertEquals( vstar.toString(),'1,,false,NaN,[object Object],null','Unexpected Vector check');
+            vstar.fixed = true;
+            assertTrue( vstar.fixed,'Unexpected Vector check');
+            
+            var customClasses:Array = [null, new TestClass2(), undefined, new TestClass1()];
+            
+            var vcustom:Vector.<TestClass1> = Vector.<TestClass1>(customClasses);
+            
+            assertFalse( vcustom.fixed,'Unexpected Vector check');
+            assertTrue( vcustom.length == 4,'Unexpected Vector check');
+            assertTrue( vcustom[0] === null,'Unexpected Vector check');
+            assertTrue( vcustom[1] is TestClass2,'Unexpected Vector check');
+            assertTrue( vcustom[2] === null,'Unexpected Vector check');
+            assertTrue( vcustom[3] is TestClass1,'Unexpected Vector check');
+            
+            var nested:Vector.<Vector.<TestClass1>> = Vector.<Vector.<TestClass1>>([vcustom, null, undefined, vcustom]);
+            assertFalse( nested.fixed,'Unexpected Vector check');
+            assertTrue( nested.length == 4,'Unexpected Vector check');
+            assertTrue( nested[0] === vcustom,'Unexpected Vector check');
+            assertTrue( nested[1] === null,'Unexpected Vector check');
+            assertTrue( nested[2] === null,'Unexpected Vector check');
+            assertTrue( nested[3] === vcustom,'Unexpected Vector check');
+            
+            //indirect/dynamic coercion
+            c = Vector.<int>;
+            var result:*;
+            result = c(source);
+            assertFalse( result.fixed,'Unexpected Vector check');
+            assertTrue( result.length == 6,'Unexpected Vector check');
+            assertFalse( result is Vector,'Unexpected Vector check');
+            assertFalse( result is Array,'Unexpected Vector check');
+            assertFalse( result is Vector.<*>,'Unexpected Vector check');
+            assertTrue( result is Vector.<int>,'Unexpected Vector check');
+            assertEquals( result.toString(),'1,0,0,0,0,0','Unexpected Vector check');
+            
+            c = Vector.<Boolean>;
+            result = c(source);
+            assertFalse( result.fixed,'Unexpected Vector check');
+            assertTrue( result.length == 6,'Unexpected Vector check');
+            assertFalse( result is Vector,'Unexpected Vector check');
+            assertFalse( result is Array,'Unexpected Vector check');
+            assertTrue( result is Vector.<*>,'Unexpected Vector check');
+            assertTrue( result is Vector.<Boolean>,'Unexpected Vector check');
+            assertEquals( result.toString(),'true,false,false,false,true,false','Unexpected Vector check');
+            
+            c = Vector.<String>;
+            result = c(source);
+            
+            assertFalse( result.fixed,'Unexpected Vector check');
+            assertTrue( result.length == 6,'Unexpected Vector check');
+            assertFalse( result is Vector,'Unexpected Vector check');
+            assertFalse( result is Array,'Unexpected Vector check');
+            assertTrue( result is Vector.<*>,'Unexpected Vector check');
+            assertTrue( result is Vector.<String>,'Unexpected Vector check');
+            assertEquals( result.toString(),'1,,false,NaN,[object Object],null','Unexpected Vector check');
+            
+            c = Vector.<*>;
+            result = c(source);
+            
+            assertFalse( result.fixed,'Unexpected Vector check');
+            assertTrue( result.length == 6,'Unexpected Vector check');
+            assertFalse( result is Vector,'Unexpected Vector check');
+            assertFalse( result is Array,'Unexpected Vector check');
+            assertTrue( result is Vector.<*>,'Unexpected Vector check');
+            assertFalse( result is Vector.<Object>,'Unexpected Vector check');
+            assertEquals( result.toString(),'1,,false,NaN,[object Object],null','Unexpected Vector check');
+        }
+        
+        [Test]
+        [TestVariance(variance="SWF",description="SWF tests for insertAt/removeAt are not run when swf version<30")]
+        public function testFixedVectorBasicMethods():void
+        {
+            var nested:Vector.<Vector.<TestClass1>> = new Vector.<Vector.<TestClass1>>(20, false);
+            
+            var caughtError:Boolean;
+            
+            nested.fixed = true;
+            try
+            {
+                caughtError = false;
+                nested.pop();
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+            
+            assertTrue( caughtError,'Unexpected Vector check');
+            try
+            {
+                caughtError = false;
+                nested.push(null);
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+            
+            assertTrue( caughtError,'Unexpected Vector check');
+            try
+            {
+                caughtError = false;
+                nested.shift();
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+            
+            assertTrue( caughtError,'Unexpected Vector check');
+            try
+            {
+                caughtError = false;
+                nested.unshift(null);
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+            
+            assertTrue( caughtError,'Unexpected Vector check');
+    
+            if (hasInsertAtRemoveAt()) {
+                try
+                {
+                    caughtError = false;
+                    nested['removeAt'](0);
+                } catch (e:Error)
+                {
+                    caughtError = e is RangeError
+                }
+                
+                assertTrue( caughtError,'Unexpected Vector check');
+            
+                try
+                {
+                    caughtError = false;
+                    nested['insertAt'](0, null);
+                } catch (e:Error)
+                {
+                    caughtError = e is RangeError
+                }
+    
+                assertTrue( caughtError,'Unexpected Vector check');
+            } else {
+                //RoyaleUnitTestRunner.consoleOut('Variance: The current target does not have support for Vector insertAt/removeAt methods', 'warn')
+            }
+            
+        }
+    
+        [Test]
+        public function testString():void
+        {
+            var inst:Vector.<String> = new Vector.<String>();
+            var something:* = undefined;
+            inst[0] = null;
+            inst[1] = undefined;
+            inst[2] = '';
+            inst[3] = new String();
+            inst[4] = something;
+            assertTrue( inst[0] === null,'unexpected coercion result');
+            assertTrue( inst[1] === null,'unexpected coercion result');
+            assertTrue( inst[2] === '','unexpected coercion result');
+            assertTrue( inst[3] === '','unexpected coercion result');
+            assertTrue( inst[4] === null,'unexpected coercion result');
+        
+            inst.push(undefined);
+            assertTrue( inst.pop() === null,'unexpected coercion result');
+            inst.push(something);
+            assertTrue( inst.pop() === null,'unexpected coercion result');
+        }
+    
+        [Test]
+        public function testBoolean():void
+        {
+            var inst:Vector.<Boolean> = new Vector.<Boolean>();
+            var nothing:* = undefined;
+            var something:* = {};
+            inst[0] = null;
+            inst[1] = undefined;
+            inst[2] = '';
+            inst[3] = new String();
+            inst[4] = nothing;
+            inst[5] = something;
+            assertTrue( inst[0] === false,'unexpected coercion result');
+            assertTrue( inst[1] === false,'unexpected coercion result');
+            assertTrue( inst[2] === false,'unexpected coercion result');
+            assertTrue( inst[3] === false,'unexpected coercion result');
+            assertTrue( inst[4] === false,'unexpected coercion result');
+            assertTrue( inst[5] === true,'unexpected coercion result');
+            
+            inst.push(undefined);
+            assertTrue( inst.pop() === false,'unexpected coercion result');
+            inst.push(nothing);
+            assertTrue( inst.pop() === false,'unexpected coercion result');
+            inst.push(something);
+            assertTrue( inst.pop() === true,'unexpected coercion result');
+        }
+    
+        [Test]
+        public function testClass():void
+        {
+            var inst:Vector.<Class> = new Vector.<Class>();
+            var nothing:* = undefined;
+            var something:* = Array;
+            inst[0] = null;
+            //@todo fix in compiler:
+            inst[1] = undefined;
+            inst[2] = String;
+            inst[3] = nothing;
+            inst[4] = something;
+            inst[5] = uint;
+            inst[6] = TestClass1;
+            assertTrue( inst[0] === null, 'unexpected coercion result');
+            assertTrue(inst[1] === null, 'unexpected coercion result');
+            assertTrue(inst[2] === String, 'unexpected coercion result');
+            assertTrue(inst[3] === null, 'unexpected coercion result');
+            assertTrue(inst[4] === Array, 'unexpected coercion result');
+            assertTrue(inst[5] === uint, 'unexpected coercion result');
+            assertTrue(inst[6] === TestClass1, 'unexpected coercion result');
+        
+            inst.push(undefined);
+            assertTrue(inst.pop() === null, 'unexpected coercion result');
+            inst.push(nothing);
+            assertTrue(inst.pop() === null,'unexpected coercion result');
+            inst.push(something);
+            assertTrue(inst.pop() === Array,'unexpected coercion result');
+        }
+    
+        [Test]
+        public function testFixedVectorMutationMethodCoercion():void
+        {
+            var tc1Vec:Vector.<TestClass1> = new Vector.<TestClass1>();
+            
+            var content:*  = new TestClass5();
+    
+            var caughtError:Boolean;
+            try
+            {
+                caughtError = false;
+                //not allowed, because TestClass5 does not coerce to TestClass1
+                tc1Vec.push(content);
+            } catch (e:Error)
+            {
+                caughtError = e is TypeError;
+                
+            }
+            //even though it was an error, it has pushed null into the vector, so it
+            //now has length of 1
+            assertTrue( tc1Vec.length == 1,'Unexpected Vector check');
+            assertTrue( caughtError,'Unexpected Vector check');
+            assertNull( tc1Vec[0],'Unexpected Vector check');
+    
+            try
+            {
+                caughtError = false;
+                //multiple args, with one valid at the start and end
+                //when the first error is hit as the second item, that items, and the following items
+                //are pushed as null
+                //the nwe length is therefore increased by 4 here,
+                //but the 2nd item is an error, so only the first one makes it in
+                tc1Vec.push(new TestClass1(), content, content, new TestClass1());
+            } catch (e:Error)
+            {
+                caughtError = e is TypeError;
+            }
+            //even though it had an extra 2 error elements, it has pushed null into the vector, so it
+            //now has length of 5
+            assertTrue( tc1Vec.length == 5,'Unexpected Vector check');
+            assertTrue( caughtError,'Unexpected Vector check');
+            assertNull( tc1Vec[0],'Unexpected Vector check');
+            assertTrue( tc1Vec[1] is TestClass1,'Unexpected Vector check');
+            assertNull( tc1Vec[2],'Unexpected Vector check');
+            assertNull( tc1Vec[3],'Unexpected Vector check');
+            assertNull( tc1Vec[4],'Unexpected Vector check');
+            
+            try
+            {
+                caughtError = false;
+                //similar to push, the first failed argument coercion (2nd argument here) results
+                //in it and the remaining items being coerced to null and unshifted
+                //so this also increases the length by 4, but only the first item makes
+                //it in (and the error is thrown)
+                tc1Vec.unshift(new TestClass1(), content, new TestClass1(), content);
+            } catch (e:Error)
+            {
+                caughtError = e is TypeError;
+            }
+    
+            assertTrue( tc1Vec.length == 9,'Unexpected Vector check');
+            assertTrue( caughtError,'Unexpected Vector check');
+            assertTrue( tc1Vec[0] is TestClass1,'Unexpected Vector check');
+            assertNull( tc1Vec[1],'Unexpected Vector check');
+            assertNull( tc1Vec[2],'Unexpected Vector check');
+            assertNull( tc1Vec[3],'Unexpected Vector check');
+            assertNull( tc1Vec[4],'Unexpected Vector check');
+            assertTrue( tc1Vec[5] is TestClass1,'Unexpected Vector check');
+            assertNull( tc1Vec[6],'Unexpected Vector check');
+            assertNull( tc1Vec[7],'Unexpected Vector check');
+            assertNull( tc1Vec[8],'Unexpected Vector check');
+            
+        }
+        
+        [Test]
+        [TestVariance(variance="SWF",description="SWF tests for insertAt/removeAt are not run when swf version<30")]
+        public function testVectorAdvancedMethods():void
+        {
+            
+            var customClasses:Array = [null, new TestClass2(), undefined, new TestClass1()];
+            
+            var vcustom:Vector.<TestClass1> = Vector.<TestClass1>(customClasses);
+            var vcustom2:Vector.<TestClass1> = vcustom.map(_mapper);
+            
+            assertTrue( vcustom2 != vcustom,'Unexpected Vector check');
+            assertTrue( vcustom2[0] is TestClass1,'Unexpected Vector check');
+            assertTrue( vcustom2[1] is TestClass1,'Unexpected Vector check');
+            assertTrue( vcustom2[2] is TestClass1,'Unexpected Vector check');
+            assertTrue( vcustom2[3] is TestClass1,'Unexpected Vector check');
+            //remove 1 item at position 1 and replace it with a new TestClass2 instance
+            var vcustom3:Vector.<TestClass1> = vcustom2.splice(1, 1, new TestClass2());
+            assertTrue( vcustom3 != vcustom2,'Unexpected Vector check');
+            assertTrue( vcustom3.length == 1,'Unexpected Vector check');
+            assertTrue( vcustom2.length == 4,'Unexpected Vector check');
+            assertTrue( vcustom3[0] is TestClass1,'Unexpected Vector check');
+            assertTrue( vcustom2[1] is TestClass2,'Unexpected Vector check');
+            
+            
+            if (hasInsertAtRemoveAt()) {
+                vcustom3['insertAt'](0, new TestClass2());
+                assertTrue( vcustom3.length == 2,'Unexpected Vector check');
+                assertTrue( vcustom3[0] is TestClass2,'Unexpected Vector check');
+                assertTrue( vcustom3[1] is TestClass1,'Unexpected Vector check');
+    
+                var removedItem:* = vcustom3['removeAt'](0);
+                assertTrue( vcustom3.length == 1,'Unexpected Vector check');
+                assertTrue( vcustom3[0] is TestClass1,'Unexpected Vector check');
+                assertTrue( removedItem is TestClass2,'Unexpected Vector check');
+    
+                var tc1Vec:Vector.<TestClass1> = new Vector.<TestClass1>(4);
+    
+                //insert at invalid index:
+                tc1Vec['insertAt'](6, new TestClass1());
+                //no error, insertAt minimises the specified index to the Vector's length and inserts there
+                assertTrue( tc1Vec.length == 5,'Unexpected Vector check');
+                assertTrue( tc1Vec[4] is TestClass1,'Unexpected Vector check');
+    
+                var caughtError:Boolean;
+                try
+                {
+                    caughtError = false;
+                    tc1Vec['removeAt'](6);
+                } catch (e:Error)
+                {
+                    caughtError = e is RangeError
+                }
+    
+                try
+                {
+                    caughtError = false;
+                    tc1Vec['removeAt'](-1);
+                } catch (e:Error)
+                {
+                    caughtError = e is RangeError
+                }
+                assertTrue( tc1Vec.length == 4,'Unexpected Vector check');
+                assertEquals( tc1Vec.toString(),'null,null,null,null','Unexpected Vector check');
+                //no error
+                assertFalse( caughtError,'Unexpected Vector check');
+    
+                try
+                {
+                    caughtError = false;
+                    tc1Vec['insertAt'](-1, new TestClass1());
+                } catch (e:Error)
+                {
+                    caughtError = e is RangeError
+                }
+    
+                assertTrue( tc1Vec.length == 5,'Unexpected Vector check');
+                //new item is at position 3
+                assertNotNull( tc1Vec[3],'Unexpected Vector check');
+                //moving the original content (null) from position 3 to 4
+                assertNull( tc1Vec[4],'Unexpected Vector check');
+                //no error
+                assertFalse( caughtError,'Unexpected Vector check');
+    
+                try
+                {
+                    caughtError = false;
+                    //even though this is out of range, it still works without error
+                    tc1Vec['insertAt'](-200, new TestClass1());
+                } catch (e:Error)
+                {
+                    caughtError = e is RangeError
+                }
+    
+                assertTrue( tc1Vec.length == 6,'Unexpected Vector check');
+                //new item is at position 0
+                assertNotNull( tc1Vec[0],'Unexpected Vector check');
+                //the other non-null item is now at postion 4
+                assertNotNull( tc1Vec[4],'Unexpected Vector check');
+                //no error
+                assertFalse( caughtError,'Unexpected Vector check');
+    
+                try
+                {
+                    caughtError = false;
+                    tc1Vec['removeAt'](-200);
+                } catch (e:Error)
+                {
+                    caughtError = e is RangeError;
+                }
+    
+                assertTrue( tc1Vec.length == 5,'Unexpected Vector check');
+                //position 0 is now null
+                assertNull( tc1Vec[0],'Unexpected Vector check');
+                //the non-null item is now at postion 3
+                assertNotNull( tc1Vec[3],'Unexpected Vector check');
+                //no error
+                assertFalse( caughtError,'Unexpected Vector check');
+                
+            }  else {
+                //RoyaleUnitTestRunner.consoleOut('Variance: The current target does not have support for Vector insertAt/removeAt methods, so these are untested', 'warn')
+            }
+           
+            
+        }
+    
+        [Test]
+        public function testSort():void{
+            var vi:Vector.<int> = new <int>[1, 2, 3, 4, 5];
+            vi.sort(Array.NUMERIC|Array.DESCENDING);
+            assertEquals( vi.toString(),'5,4,3,2,1','Unexpected Vector check');
+        }
+        
+        [Test]
+        public function testVectorConcat():void
+        {
+            var source:Array = [1, '', false, NaN, {test: true}, undefined];
+            var vi1:Vector.<int> = new <int>[1, 2, 3, 4, 5];
+            var vi2:Vector.<int> = new <int>[5, 4, 3, 2, 1];
+            var vu2:Vector.<uint> = new <uint>[5, 4, 3, 2, 1];
+            var vi3:Vector.<int> = vi1.concat(vi2);
+            assertEquals( vi3.toString(),'1,2,3,4,5,5,4,3,2,1','Unexpected Vector check');
+            assertTrue( vi3 is Vector.<int>,'Unexpected Vector check');
+            
+            var caughtError:Boolean;
+            try
+            {
+                caughtError = false;
+                vi3 = vi1.concat(vu2);
+            } catch (e:Error)
+            {
+                caughtError = e is TypeError
+            }
+            assertTrue( caughtError,'Unexpected Vector check');
+            
+            var vs:Vector.<String> = Vector.<String>(source);
+            var testConcat:Vector.<String> = vs.concat(vs);
+            assertEquals( testConcat.toString(),'1,,false,NaN,[object Object],null,1,,false,NaN,[object Object],null','Unexpected Vector check');
+            assertTrue( testConcat is Vector.<String>,'Unexpected Vector check');
+            
+        }
+    
+    
+        [Test]
+        public function testVectorSlice():void
+        {
+            var source:Array = [1, '', false, NaN, {test: true}, undefined];
+            var vi1:Vector.<int> = new <int>[1, 2, 3, 4, 5];
+            var vi2:Vector.<int> = vi1.slice();
+            assertEquals( vi2.toString(),'1,2,3,4,5','Unexpected Vector check');
+            assertTrue( vi2 is Vector.<int>,'Unexpected Vector check');
+            vi2 = vi1.slice(1);
+            assertEquals( vi2.toString(),'2,3,4,5','Unexpected Vector check');
+            assertTrue( vi2 is Vector.<int>,'Unexpected Vector check');
+    
+            vi2 = vi1.slice(0,0);
+            assertEquals( vi2.toString(),'','Unexpected Vector check');
+            assertTrue( vi2 is Vector.<int>,'Unexpected Vector check');
+    
+            vi2 = vi1.slice(1,-1);
+            assertEquals( vi2.toString(),'2,3,4','Unexpected Vector check');
+            assertTrue( vi2 is Vector.<int>,'Unexpected Vector check');
+        
+            var vs:Vector.<String> = Vector.<String>(source);
+            var testSlice:Vector.<String> = vs.slice();
+            assertEquals( testSlice.toString(),'1,,false,NaN,[object Object],null','Unexpected Vector check');
+            assertTrue( testSlice is Vector.<String>,'Unexpected Vector check');
+        
+        }
+        
+        
+        
+        [Test]
+        public function testVectorFilter():void
+        {
+            var vi1:Vector.<int> = new <int>[1, 2, 3, 4, 5, 4, 3, 2, 1];
+            
+            var f:Function = function (value:int, index:int, source:*):Boolean
+            {
+                return value > 2
+            };
+            
+            var vi2:Vector.<int> = vi1.filter(f);
+            assertEquals( vi2.toString(),'3,4,5,4,3','Unexpected Vector check');
+            assertFalse( vi2 is Array,'Unexpected Vector check');
+            assertTrue( vi2 is Vector.<int>,'Unexpected Vector check');
+        }
+        
+        [Test]
+        public function testVectorAsIs():void
+        {
+            var source:Array = [1, '', false, NaN, {test: true}, undefined];
+            
+            var vi:Vector.<int> = Vector.<int>(source);
+            assertFalse( vi is Vector,'Unexpected Vector check');
+            assertFalse( vi is Array,'Unexpected Vector check');
+            assertTrue( vi is Vector.<int>,'Unexpected Vector check');
+            assertFalse( vi is Vector.<*>,'Unexpected Vector check');
+            
+            var vu:Vector.<uint> = Vector.<uint>(source);
+            assertFalse( vu is Vector,'Unexpected Vector check');
+            assertFalse( vu is Array,'Unexpected Vector check');
+            assertTrue( vu is Vector.<uint>,'Unexpected Vector check');
+            assertFalse( vu is Vector.<*>,'Unexpected Vector check');
+            
+            var vn:Vector.<Number> = Vector.<Number>(source);
+            assertFalse( vn is Vector,'Unexpected Vector check');
+            assertFalse( vn is Array,'Unexpected Vector check');
+            assertTrue( vn is Vector.<Number>,'Unexpected Vector check');
+            assertFalse( vn is Vector.<*>,'Unexpected Vector check');
+            
+            var vb:Vector.<Boolean> = Vector.<Boolean>(source);
+            assertFalse( vb is Vector,'Unexpected Vector check');
+            assertFalse( vb is Array,'Unexpected Vector check');
+            assertTrue( vb is Vector.<Boolean>,'Unexpected Vector check');
+            assertTrue( vb is Vector.<*>,'Unexpected Vector check');
+            
+            var vs:Vector.<String> = Vector.<String>(source);
+            assertFalse( vs is Vector,'Unexpected Vector check');
+            assertFalse( vs is Array,'Unexpected Vector check');
+            assertTrue( vs is Vector.<String>,'Unexpected Vector check');
+            assertTrue( vs is Vector.<*>,'Unexpected Vector check');
+            
+            var vstar:Vector.<*> = Vector.<*>(source);
+            assertFalse( vstar is Vector,'Unexpected Vector check');
+            assertFalse( vstar is Array,'Unexpected Vector check');
+            assertTrue( vstar is Vector.<*>,'Unexpected Vector check');
+            assertTrue( vstar is Vector.<*>,'Unexpected Vector check');
+            
+            
+            var customClasses:Array = [null, new TestClass2(), undefined, new TestClass1()];
+            
+            var vcustom:Vector.<TestClass1> = Vector.<TestClass1>(customClasses);
+            
+            assertFalse( vcustom is Vector,'Unexpected Vector check');
+            assertFalse( vcustom is Array,'Unexpected Vector check');
+            assertTrue( vcustom is Vector.<TestClass1>,'Unexpected Vector check');
+            assertTrue( vcustom is Vector.<*>,'Unexpected Vector check');
+    
+            customClasses.push(new TestClass5());
+            var oldDef:Vector.<TestClass1> = vcustom;
+            //this is a coercion error
+            var caughtError:Boolean;
+            try
+            {
+                caughtError = false;
+                vcustom = Vector.<TestClass1>(customClasses);
+            } catch (e:Error)
+            {
+                caughtError = e is TypeError;
+            }
+    
+            assertTrue( caughtError,'Unexpected Vector check');
+            assertEquals( oldDef,vcustom,'Unexpected Vector check');
+        }
+        
+        [Test]
+        /**
+         * @royalesuppresscompleximplicitcoercion Vector.<TestClass1>
+         */
+        public function testVectorAsIsIndirect():void
+        {
+            var source:Array = [1, '', false, NaN, {test: true}, undefined];
+            
+            var vi:Vector.<int> = Vector.<int>(source);
+            assertFalse( vi is Vector,'Unexpected Vector check');
+            assertFalse( vi is Array,'Unexpected Vector check');
+            assertTrue( vi is Vector.<int>,'Unexpected Vector check');
+            assertFalse( vi is Vector.<*>,'Unexpected Vector check');
+            
+            var vu:Vector.<uint> = Vector.<uint>(source);
+            assertFalse( vu is Vector,'Unexpected Vector check');
+            assertFalse( vu is Array,'Unexpected Vector check');
+            assertTrue( vu is Vector.<uint>,'Unexpected Vector check');
+            assertFalse( vu is Vector.<*>,'Unexpected Vector check');
+            
+            var vn:Vector.<Number> = Vector.<Number>(source);
+            assertFalse( vn is Vector,'Unexpected Vector check');
+            assertFalse( vn is Array,'Unexpected Vector check');
+            assertTrue( vn is Vector.<Number>,'Unexpected Vector check');
+            assertFalse( vn is Vector.<*>,'Unexpected Vector check');
+            
+            var vb:Vector.<Boolean> = Vector.<Boolean>(source);
+            assertFalse( vb is Vector,'Unexpected Vector check');
+            assertFalse( vb is Array,'Unexpected Vector check');
+            assertTrue( vb is Vector.<Boolean>,'Unexpected Vector check');
+            assertTrue( vb is Vector.<*>,'Unexpected Vector check');
+            
+            var vs:Vector.<String> = Vector.<String>(source);
+            assertFalse( vs is Vector,'Unexpected Vector check');
+            assertFalse( vs is Array,'Unexpected Vector check');
+            assertTrue( vs is Vector.<String>,'Unexpected Vector check');
+            assertTrue( vs is Vector.<*>,'Unexpected Vector check');
+            
+            var vstar:Vector.<*> = Vector.<*>(source);
+            assertFalse( vstar is Vector,'Unexpected Vector check');
+            assertFalse( vstar is Array,'Unexpected Vector check');
+            assertTrue( vstar is Vector.<*>,'Unexpected Vector check');
+            assertTrue( vstar is Vector.<*>,'Unexpected Vector check');
+            
+            
+            var customClasses:Array = [null, new TestClass2(), undefined, new TestClass1()];
+            
+            var vcustom:Vector.<TestClass1> = Vector.<TestClass1>(customClasses);
+            
+            assertFalse( vcustom is Vector,'Unexpected Vector check');
+            assertFalse( vcustom is Array,'Unexpected Vector check');
+            assertTrue( vcustom is Vector.<TestClass1>,'Unexpected Vector check');
+            assertTrue( vcustom is Vector.<*>,'Unexpected Vector check');
+    
+            var claZZ:Class = Vector.<TestClass1>;
+            vcustom = claZZ(customClasses);
+    
+            assertFalse( vcustom is Vector,'Unexpected Vector check');
+            assertFalse( vcustom is Array,'Unexpected Vector check');
+            assertTrue( vcustom is Vector.<TestClass1>,'Unexpected Vector check');
+            assertTrue( vcustom is Vector.<*>,'Unexpected Vector check');
+        }
+        
+        [Test]
+        public function testVectorLiteral():void
+        {
+            var test:* = 'hello';
+            var vi:Vector.<int> = new <int>[1, 2, test, 4, 5];
+            
+            assertFalse( vi.fixed,'Unexpected Vector check');
+            assertTrue( vi.length == 5,'Unexpected Vector check');
+            assertEquals( vi.toString(),'1,2,0,4,5','Unexpected Vector check');
+        }
+        
+        [Test]
+        public function testVectorLengthIncreasedDefaults():void
+        {
+            var vi:Vector.<int> = new <int>[1, 2, 3, 4, 5];
+            vi.length = 10;
+            assertFalse( vi.fixed,'Unexpected Vector check');
+            assertTrue( vi.length == 10,'Unexpected Vector check');
+            assertEquals( vi.toString(),'1,2,3,4,5,0,0,0,0,0','Unexpected Vector check');
+        }
+        
+        [TestVariance(variance="JS", description="Variance in js implementation for access to 'constructor' via Vector instance, js is specific vs. Vector.<*> in swf.")]
+        [Test]
+        public function testVectorConstructor():void
+        {
+            var vi:Vector.<int> = new <int>[1, 2, 3, 4, 5];
+            assertTrue( vi['constructor'] === Vector.<int>,'Unexpected Vector check');
+            
+            var vui:Vector.<uint> = new <uint>[1, 2, 3, 4, 5];
+            assertTrue( vui['constructor'] === Vector.<uint>,'Unexpected Vector check');
+            
+            var vn:Vector.<Number> = new <Number>[1, 2, 3, 4, 5];
+            assertTrue( vn['constructor'] === Vector.<Number>,'Unexpected Vector check');
+            
+            var vs:Vector.<String> = new <String>[];
+            //current variance in the javascript vs. avm implementations
+            const expected:Class = isJS ? Vector.<String> : Vector.<*>;
+            assertTrue( vs['constructor'] === expected,'Unexpected Vector check');
+        }
+        
+        
+        private var _viTest:Vector.<int>;
+        
+        private function getVector():Vector.<int>
+        {
+            return _viTest;
+        }
+        
+        [Test]
+        public function testFixedVectorLengthChangeErrors():void
+        {
+            var vi:Vector.<int> = new <int>[1, 2, 3, 4, 5];
+            vi.fixed = true;
+            _viTest = vi;
+            
+            var caughtError:Boolean;
+            try
+            {
+                caughtError = false;
+                vi.length = 10;
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+            
+            assertTrue( caughtError,'Unexpected Vector check');
+            
+            try
+            {
+                caughtError = false;
+                vi.length += 5;
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+            
+            assertTrue( caughtError,'Unexpected Vector check');
+            
+            try
+            {
+                caughtError = false;
+                vi.length = vi.length + 5;
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+            
+            assertTrue( caughtError,'Unexpected Vector check');
+            
+            try
+            {
+                caughtError = false;
+                vi.length++;
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+            
+            assertTrue( caughtError,'Unexpected Vector check');
+            
+            try
+            {
+                caughtError = false;
+                vi.length--;
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+            
+            assertTrue( caughtError,'Unexpected Vector check');
+            
+            try
+            {
+                caughtError = false;
+                ++vi.length;
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+            
+            assertTrue( caughtError,'Unexpected Vector check');
+            
+            try
+            {
+                caughtError = false;
+                --vi.length;
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+            
+            assertTrue( caughtError,'Unexpected Vector check');
+            
+            try
+            {
+                caughtError = false;
+                _viTest.length = 10;
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+            
+            assertTrue( caughtError,'Unexpected Vector check');
+            
+            try
+            {
+                caughtError = false;
+                _viTest.length += 5;
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+            
+            assertTrue( caughtError,'Unexpected Vector check');
+            
+            try
+            {
+                caughtError = false;
+                _viTest.length = _viTest.length + 5;
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+            
+            assertTrue( caughtError,'Unexpected Vector check');
+            
+            try
+            {
+                caughtError = false;
+                _viTest.length++;
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+            
+            assertTrue( caughtError,'Unexpected Vector check');
+            
+            try
+            {
+                caughtError = false;
+                _viTest.length--;
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+            
+            assertTrue( caughtError,'Unexpected Vector check');
+            
+            try
+            {
+                caughtError = false;
+                ++_viTest.length;
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+            
+            assertTrue( caughtError,'Unexpected Vector check');
+            
+            try
+            {
+                caughtError = false;
+                --_viTest.length;
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+            
+            assertTrue( caughtError,'Unexpected Vector check');
+            
+            try
+            {
+                caughtError = false;
+                getVector().length = 10;
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+            
+            assertTrue( caughtError,'Unexpected Vector check');
+            
+            try
+            {
+                caughtError = false;
+                getVector().length += 5;
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+            
+            assertTrue( caughtError,'Unexpected Vector check');
+            
+            try
+            {
+                caughtError = false;
+                getVector().length = _viTest.length + 5;
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+            
+            assertTrue( caughtError,'Unexpected Vector check');
+            
+            try
+            {
+                caughtError = false;
+                getVector().length++;
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+            
+            assertTrue( caughtError,'Unexpected Vector check');
+            
+            try
+            {
+                caughtError = false;
+                getVector().length--;
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+            
+            assertTrue( caughtError,'Unexpected Vector check');
+            
+            try
+            {
+                caughtError = false;
+                ++getVector().length;
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+            
+            assertTrue( caughtError,'Unexpected Vector check');
+            
+            try
+            {
+                caughtError = false;
+                --getVector().length;
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+            
+            assertTrue( caughtError,'Unexpected Vector check');
+        }
+        
+        [Test]
+        /**
+         * no matter what the global setting is, do not suppress index checks inside this method:
+         * @royalesuppressvectorindexcheck false
+         */
+        public function testRegularVectorIndexChecks():void
+        {
+            var vi:Vector.<int> = new <int>[1, 2, 3, 4, 5];
+            //allowed, not an error:
+            vi[5] = 6;
+            assertTrue( vi.length == 6,'Unexpected Vector check');
+            assertEquals( vi.toString(),'1,2,3,4,5,6', 'Unexpected Vector check');
+            var caughtError:Boolean;
+            try
+            {
+                caughtError = false;
+                //not allowed, because even though fixed==false,
+                //Vectors are not allowed to be sparse and
+                //index is greater than current length of 6
+                vi[7] = 8;
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+            
+            assertTrue( vi.length == 6,'Unexpected Vector check');
+            assertTrue( caughtError,'Unexpected Vector check');
+            
+            try
+            {
+                caughtError = false;
+                vi.fixed = true;
+                //not allowed, because it is now fixed length of 6 (after v[5] = 6 above)
+                //so anything outside range of 0..5 is not permitted
+                vi[6] = 7;
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+            
+            assertTrue( vi.length == 6,'Unexpected Vector check');
+            assertTrue( caughtError,'Unexpected Vector check');
+    
+            try
+            {
+                caughtError = false;
+                //not allowed, because it is a non-uint index
+                //only uint indices in range of 0..5 are permitted
+                vi[1.5] = 0;
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+    
+            assertTrue( vi.length == 6,'Unexpected Vector check');
+            assertTrue( caughtError,'Unexpected Vector check');
+            
+            try
+            {
+                caughtError = false;
+                //this is a non-realistic example which should not be encountered in 'real' code
+                //but is included here for coverage
+                new Vector.<int>()[2] = 3;
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+            assertTrue( caughtError,'Unexpected Vector check');
+        }
+    
+    
+        [TestVariance(variance="JS", description="Variance in js implementation with @royalesuppressvectorindexcheck true, Vector instance can enter invalid state.")]
+        [Test]
+        /**
+         * local avoidance of vector index checking (all cases)
+         * no matter what the global setting is, always suppress inside this method:
+         * @royalesuppressvectorindexcheck true
+         * this will cause variance in the most Assertions
+         */
+        public function testSuppressedVectorIndexChecks():void
+        {
+            var vi:Vector.<int> = new <int>[1, 2, 3, 4, 5];
+            //allowed, not an error:
+            vi[5] = 6;
+            assertTrue( vi.length == 6,'Unexpected Vector check');
+            assertEquals( vi.toString(), '1,2,3,4,5,6','Unexpected Vector check');
+            var caughtError:Boolean;
+            try
+            {
+                caughtError = false;
+                //not allowed, because even though fixed==false,
+                //Vectors are not allowed to be sparse and
+                //index is greater than current length of 6
+                vi[7] = 8;
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+            
+            assertTrue( vi.length == (isJS? 8 : 6),'Unexpected Vector check');
+            assertTrue( caughtError === (isJS ? false : true),'Unexpected Vector check');
+    
+            try
+            {
+                caughtError = false;
+                vi.fixed = true;
+                //not allowed, because it is now fixed length of 6 (after v[5] = 6 above)
+                //so anything outside range of 0..5 is not permitted
+                vi[6] = 7;
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+    
+            assertTrue( vi.length == (isJS? 8 : 6),'Unexpected Vector check');
+            assertTrue( caughtError === (isJS ? false : true),'Unexpected Vector check');
+    
+            try
+            {
+                caughtError = false;
+                //not allowed, because it is a non-uint index
+                //only uint indices in range of 0..5 are permitted
+                vi[1.5] = 0;
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+    
+            assertTrue( vi.length == (isJS? 8 : 6),'Unexpected Vector check');
+            assertTrue( caughtError === (isJS ? false : true),'Unexpected Vector check');
+    
+            try
+            {
+                caughtError = false;
+                //this is a non-realistic example which should not be encountered in 'real' code
+                //but is included here for coverage
+                new Vector.<int>()[2] = 3;
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+            assertTrue( caughtError  === (isJS ? false : true),'Unexpected Vector check');
+        }
+    
+        [TestVariance(variance="JS", description="Variance in js implementation with @royalesuppressvectorindexcheck {name here}, Vector instance can enter invalid state.")]
+        [Test]
+        /**
+         * local avoidance of vector index checking (specific named case only)
+         * no matter what the global setting is, do not suppress by default inside this method:
+         * @royalesuppressvectorindexcheck false
+         * aside from the above, suppress index checking specifically for an instance referenced as 'vi2':
+         * @royalesuppressvectorindexcheck vi2
+         * this will cause variance in the last Assertion
+         */
+        public function testSpecificSuppressedVectorIndexChecks():void
+        {
+            var vi:Vector.<int> = new <int>[1, 2, 3, 4, 5];
+            //allowed, not an error:
+            vi[5] = 6;
+            assertTrue( vi.length == 6,'Unexpected Vector check');
+            assertEquals( vi.toString(), '1,2,3,4,5,6','Unexpected Vector check');
+            var caughtError:Boolean;
+            try
+            {
+                caughtError = false;
+                //not allowed, because even though fixed==false,
+                //Vectors are not allowed to be sparse and
+                //index is greater than current length of 6
+                vi[7] = 8;
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+    
+            assertTrue( vi.length == 6,'Unexpected Vector check');
+            assertTrue( caughtError,'Unexpected Vector check');
+    
+            try
+            {
+                caughtError = false;
+                vi.fixed = true;
+                //not allowed, because it is now fixed length of 6 (after v[5] = 6 above)
+                //so anything outside range of 0..5 is not permitted
+                vi[6] = 7;
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+    
+            assertTrue( vi.length == 6,'Unexpected Vector check');
+            assertTrue( caughtError,'Unexpected Vector check');
+    
+            try
+            {
+                caughtError = false;
+                //not allowed, because it is a non-uint index
+                //only uint indices in range of 0..5 are permitted
+                vi[1.5] = 0;
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+    
+            assertTrue( vi.length == 6,'Unexpected Vector check');
+            assertTrue( caughtError,'Unexpected Vector check');
+            
+            var vi2:Vector.<int> = vi;
+            try
+            {
+                caughtError = false;
+                //not allowed, because it is a non-uint index
+                //only uint indices in range of 0..5 are permitted
+                vi2[1.5] = 0;
+            } catch (e:Error)
+            {
+                caughtError = e is RangeError
+            }
+        
+            assertTrue( vi2.length == 6,'Unexpected Vector check');
+            assertTrue( caughtError === (isJS ? false : true),'Unexpected Vector check');
+        }
+        
+        
+        //these accessors/methods etc also serve to visually inspect
+        //the doc comment '@type' annotation in js-debug
+        //it should be:  @type {Array}
+        protected function get instGetterTest():Vector.<String> {
+            return new Vector.<String>();
+        }
+    
+        protected static function get getterTest():Vector.<String> {
+            return new Vector.<String>();
+        }
+    
+    
+        protected function instGetTestVector():Vector.<String> {
+            return new Vector.<String>();
+        }
+    
+        protected static function getTestVector():Vector.<String> {
+            return new Vector.<String>();
+        }
+        
+        protected var instMyVec:Vector.<String> = new Vector.<String>() ;
+    
+        protected static var myVec:Vector.<String> = new Vector.<String>() ;
+    
+        protected static var myVec2:Vector.<TestClass1> = new Vector.<TestClass1>() ;
+    
+        [Test]
+        public function testGetter():void{
+            var vString:Vector.<String> = instGetterTest;
+    
+            assertTrue( vString is Vector.<String>,'Unexpected Vector check');
+            assertFalse( vString is Array,'Unexpected Vector check');
+            
+            vString = instMyVec;
+    
+            assertTrue( vString is Vector.<String>,'Unexpected Vector check');
+            assertFalse( vString is Array,'Unexpected Vector check');
+    
+            vString = instGetTestVector();
+    
+            assertTrue( vString is Vector.<String>,'Unexpected Vector check');
+            assertFalse( vString is Array,'Unexpected Vector check');
+            
+            //static
+            vString = getterTest;
+    
+            assertTrue( vString is Vector.<String>,'Unexpected Vector check');
+            assertFalse( vString is Array,'Unexpected Vector check');
+    
+            vString = getTestVector();
+    
+            assertTrue( vString is Vector.<String>,'Unexpected Vector check');
+            assertFalse( vString is Array,'Unexpected Vector check');
+    
+            vString = myVec;
+    
+            assertTrue( vString is Vector.<String>,'Unexpected Vector check');
+            assertFalse( vString is Array,'Unexpected Vector check');
+        }
+    
+        [Test]
+        public function checkInterface():void{
+            var v:Vector.<ITestInterface> = new <ITestInterface>[];
+            v.push(new TestClass1());
+            assertTrue( v.length == 1,'Unexpected Vector check');
+            assertTrue( v[0] is TestClass1,'Unexpected Vector check');
+        
+            v=new Vector.<ITestInterface>();
+            v.push(new TestClass1());
+            assertTrue( v.length == 1,'Unexpected Vector check');
+            assertTrue( v[0] is TestClass1,'Unexpected Vector check');
+        
+            v = Vector.<ITestInterface>([new TestClass1()]);
+            assertTrue( v.length == 1,'Unexpected Vector check');
+            assertTrue( v[0] is TestClass1,'Unexpected Vector check');
+            var err:Boolean;
+            try {
+                v.push(new TestClass5())
+            } catch (e:Error)
+            {
+                err=true;
+            }
+            assertTrue( err,'Unexpected Vector check');
+        }
+    
+        [Test]
+        public function testFilePrivate():void{
+            //specifically tested because of qualified name variations for javascript at compiler level
+            //literal:
+            var v:Vector.<PrivateClass> = new <PrivateClass>[];
+            v.push(new PrivateClass());
+            assertTrue( v.length == 1,'Unexpected Vector check');
+            assertTrue( v[0] is PrivateClass,'Unexpected Vector check');
+            //normal constructor:
+            v=new Vector.<PrivateClass>();
+            v.push(new PrivateClass());
+            assertTrue( v.length == 1,'Unexpected Vector check');
+            assertTrue( v[0] is PrivateClass,'Unexpected Vector check');
+            //coercion
+            v = Vector.<PrivateClass>([]);
+            v.push(new PrivateClass());
+            assertTrue( v.length == 1,'Unexpected Vector check');
+            assertTrue( v[0] is PrivateClass,'Unexpected Vector check');
+        
+        }
+        
+        
+    }
+}
+
+class PrivateClass {
+    
+    public function PrivateClass(){
+    
+    }
+}
diff --git a/manualtests/UnitTests/src/main/royale/flexUnitTests/reflection/support/ITestInterface3.as b/frameworks/projects/Core/src/test/royale/flexUnitTests/language/support/ITestInterface.as
similarity index 90%
copy from manualtests/UnitTests/src/main/royale/flexUnitTests/reflection/support/ITestInterface3.as
copy to frameworks/projects/Core/src/test/royale/flexUnitTests/language/support/ITestInterface.as
index 05825f4..a6f7e65 100644
--- a/manualtests/UnitTests/src/main/royale/flexUnitTests/reflection/support/ITestInterface3.as
+++ b/frameworks/projects/Core/src/test/royale/flexUnitTests/language/support/ITestInterface.as
@@ -16,12 +16,11 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
-package flexUnitTests.reflection.support
+package flexUnitTests.language.support
 {
-
-	public interface ITestInterface3
-	{
-			//empty
-
-	}
+    
+    public interface ITestInterface
+    {
+    
+    }
 }
diff --git a/manualtests/UnitTests/src/main/royale/flexUnitTests/reflection/support/ITestInterface3.as b/frameworks/projects/Core/src/test/royale/flexUnitTests/language/support/ITestInterface2.as
similarity index 88%
copy from manualtests/UnitTests/src/main/royale/flexUnitTests/reflection/support/ITestInterface3.as
copy to frameworks/projects/Core/src/test/royale/flexUnitTests/language/support/ITestInterface2.as
index 05825f4..fc52d4f 100644
--- a/manualtests/UnitTests/src/main/royale/flexUnitTests/reflection/support/ITestInterface3.as
+++ b/frameworks/projects/Core/src/test/royale/flexUnitTests/language/support/ITestInterface2.as
@@ -16,12 +16,12 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
-package flexUnitTests.reflection.support
+package flexUnitTests.language.support
 {
-
-	public interface ITestInterface3
-	{
-			//empty
-
-	}
+    
+    public interface ITestInterface2 extends ITestInterface
+    {
+    
+    
+    }
 }
diff --git a/manualtests/UnitTests/src/main/royale/flexUnitTests/reflection/support/ITestInterface3.as b/frameworks/projects/Core/src/test/royale/flexUnitTests/language/support/ITestInterface3.as
similarity index 89%
copy from manualtests/UnitTests/src/main/royale/flexUnitTests/reflection/support/ITestInterface3.as
copy to frameworks/projects/Core/src/test/royale/flexUnitTests/language/support/ITestInterface3.as
index 05825f4..7de226b 100644
--- a/manualtests/UnitTests/src/main/royale/flexUnitTests/reflection/support/ITestInterface3.as
+++ b/frameworks/projects/Core/src/test/royale/flexUnitTests/language/support/ITestInterface3.as
@@ -16,12 +16,12 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
-package flexUnitTests.reflection.support
+package flexUnitTests.language.support
 {
-
-	public interface ITestInterface3
-	{
-			//empty
-
-	}
+    
+    public interface ITestInterface3
+    {
+        //empty
+        
+    }
 }
diff --git a/manualtests/UnitTests/src/main/royale/flexUnitTests/reflection/support/ITestInterface3.as b/frameworks/projects/Core/src/test/royale/flexUnitTests/language/support/ITestInterface4.as
similarity index 87%
copy from manualtests/UnitTests/src/main/royale/flexUnitTests/reflection/support/ITestInterface3.as
copy to frameworks/projects/Core/src/test/royale/flexUnitTests/language/support/ITestInterface4.as
index 05825f4..bad16df 100644
--- a/manualtests/UnitTests/src/main/royale/flexUnitTests/reflection/support/ITestInterface3.as
+++ b/frameworks/projects/Core/src/test/royale/flexUnitTests/language/support/ITestInterface4.as
@@ -16,12 +16,12 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
-package flexUnitTests.reflection.support
+package flexUnitTests.language.support
 {
-
-	public interface ITestInterface3
-	{
-			//empty
-
-	}
+    
+    public interface ITestInterface4 extends ITestInterface2, ITestInterface3
+    {
+    
+    
+    }
 }
diff --git a/manualtests/UnitTests/src/main/royale/flexUnitTests/ObservedBugsTester.as b/frameworks/projects/Core/src/test/royale/flexUnitTests/language/support/TestClass1.as
similarity index 75%
copy from manualtests/UnitTests/src/main/royale/flexUnitTests/ObservedBugsTester.as
copy to frameworks/projects/Core/src/test/royale/flexUnitTests/language/support/TestClass1.as
index 11f62e3..9bae597 100644
--- a/manualtests/UnitTests/src/main/royale/flexUnitTests/ObservedBugsTester.as
+++ b/frameworks/projects/Core/src/test/royale/flexUnitTests/language/support/TestClass1.as
@@ -16,18 +16,19 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
-package flexUnitTests
+package flexUnitTests.language.support
 {
-	import flexUnitTests.observedbugs.*
-	
-    [Suite]
-    [RunWith("org.flexunit.runners.Suite")]
-    public class ObservedBugsTester
+    
+    
+    public class TestClass1 implements ITestInterface
     {
-        public function ObservedBugsTester()
+        //Note: do not change this test class unless you change the related tests to
+        //support any changes that might appear when testing against it
+        public function TestClass1()
         {
-            var arr:Array = [ObservedBugTests];
+        
         }
-        public var observedBugsTest1:ObservedBugTests;
+        
+        
     }
 }
diff --git a/manualtests/UnitTests/src/main/royale/flexUnitTests/ObservedBugsTester.as b/frameworks/projects/Core/src/test/royale/flexUnitTests/language/support/TestClass2.as
similarity index 75%
copy from manualtests/UnitTests/src/main/royale/flexUnitTests/ObservedBugsTester.as
copy to frameworks/projects/Core/src/test/royale/flexUnitTests/language/support/TestClass2.as
index 11f62e3..99b719c 100644
--- a/manualtests/UnitTests/src/main/royale/flexUnitTests/ObservedBugsTester.as
+++ b/frameworks/projects/Core/src/test/royale/flexUnitTests/language/support/TestClass2.as
@@ -16,18 +16,19 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
-package flexUnitTests
+package flexUnitTests.language.support
 {
-	import flexUnitTests.observedbugs.*
-	
-    [Suite]
-    [RunWith("org.flexunit.runners.Suite")]
-    public class ObservedBugsTester
+    
+    public class TestClass2 extends TestClass1
     {
-        public function ObservedBugsTester()
+        //Note: do not change this test class unless you change the related tests to
+        //support any changes that might appear when testing against it
+        
+        public function TestClass2()
         {
-            var arr:Array = [ObservedBugTests];
+        
         }
-        public var observedBugsTest1:ObservedBugTests;
+        
+        
     }
 }
diff --git a/manualtests/UnitTests/src/main/royale/flexUnitTests/GithubIssuesTester.as b/frameworks/projects/Core/src/test/royale/flexUnitTests/language/support/TestClass3.as
similarity index 87%
copy from manualtests/UnitTests/src/main/royale/flexUnitTests/GithubIssuesTester.as
copy to frameworks/projects/Core/src/test/royale/flexUnitTests/language/support/TestClass3.as
index 72b5ee1..ddb595b 100644
--- a/manualtests/UnitTests/src/main/royale/flexUnitTests/GithubIssuesTester.as
+++ b/frameworks/projects/Core/src/test/royale/flexUnitTests/language/support/TestClass3.as
@@ -16,14 +16,13 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
-package flexUnitTests
+package flexUnitTests.language.support
 {
-	import flexUnitTests.github.*
-	
-    [Suite]
-    [RunWith("org.flexunit.runners.Suite")]
-    public class GithubIssuesTester
+    
+    
+    public class TestClass3 extends TestClass1 implements ITestInterface2, ITestInterface3
     {
     
+    
     }
 }
diff --git a/manualtests/UnitTests/src/main/royale/flexUnitTests/ObservedBugsTester.as b/frameworks/projects/Core/src/test/royale/flexUnitTests/language/support/TestClass4.as
similarity index 73%
copy from manualtests/UnitTests/src/main/royale/flexUnitTests/ObservedBugsTester.as
copy to frameworks/projects/Core/src/test/royale/flexUnitTests/language/support/TestClass4.as
index 11f62e3..b5f982d 100644
--- a/manualtests/UnitTests/src/main/royale/flexUnitTests/ObservedBugsTester.as
+++ b/frameworks/projects/Core/src/test/royale/flexUnitTests/language/support/TestClass4.as
@@ -16,18 +16,20 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
-package flexUnitTests
+package flexUnitTests.language.support
 {
-	import flexUnitTests.observedbugs.*
-	
-    [Suite]
-    [RunWith("org.flexunit.runners.Suite")]
-    public class ObservedBugsTester
+    
+    
+    public class TestClass4 extends TestClass3 implements ITestInterface4
     {
-        public function ObservedBugsTester()
+        //Note: do not change this test class unless you change the related tests to
+        //support any changes that might appear when testing reflection into it
+        
+        public function TestClass4()
         {
-            var arr:Array = [ObservedBugTests];
+        
         }
-        public var observedBugsTest1:ObservedBugTests;
+        
+        
     }
 }
diff --git a/manualtests/UnitTests/src/main/royale/flexUnitTests/ObservedBugsTester.as b/frameworks/projects/Core/src/test/royale/flexUnitTests/language/support/TestClass5.as
similarity index 76%
copy from manualtests/UnitTests/src/main/royale/flexUnitTests/ObservedBugsTester.as
copy to frameworks/projects/Core/src/test/royale/flexUnitTests/language/support/TestClass5.as
index 11f62e3..e1d8ec1 100644
--- a/manualtests/UnitTests/src/main/royale/flexUnitTests/ObservedBugsTester.as
+++ b/frameworks/projects/Core/src/test/royale/flexUnitTests/language/support/TestClass5.as
@@ -16,18 +16,20 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
-package flexUnitTests
+package flexUnitTests.language.support
 {
-	import flexUnitTests.observedbugs.*
-	
-    [Suite]
-    [RunWith("org.flexunit.runners.Suite")]
-    public class ObservedBugsTester
+    
+    
+    public class TestClass5
     {
-        public function ObservedBugsTester()
+        //Note: do not change this test class unless you change the related tests to
+        //support any changes that might appear when testing reflection into it
+        
+        public function TestClass5()
         {
-            var arr:Array = [ObservedBugTests];
+        
         }
-        public var observedBugsTest1:ObservedBugTests;
+        
+        
     }
 }
diff --git a/frameworks/projects/CreateJS/pom.xml b/frameworks/projects/CreateJS/pom.xml
index 9ba653d..bbbbe5e 100644
--- a/frameworks/projects/CreateJS/pom.xml
+++ b/frameworks/projects/CreateJS/pom.xml
@@ -58,7 +58,7 @@
           </includeFiles>
           <skipExtern>true</skipExtern>
           <skipAS>${royale.skipAS}</skipAS>
-          <additionalCompilerOptions>-js-default-initializers=false;-source-map=true</additionalCompilerOptions>
+          <additionalCompilerOptions>-js-default-initializers=false;-js-complex-implicit-coercions=false;-js-vector-index-checks=false;-js-resolve-uncertain=false;-source-map=true</additionalCompilerOptions>
         </configuration>
       </plugin>
     </plugins>
diff --git a/frameworks/projects/DragDrop/pom.xml b/frameworks/projects/DragDrop/pom.xml
index ba2c12e..a214535 100644
--- a/frameworks/projects/DragDrop/pom.xml
+++ b/frameworks/projects/DragDrop/pom.xml
@@ -52,7 +52,7 @@
           </includeClasses>
           <skipExtern>true</skipExtern>
           <skipAS>${royale.skipAS}</skipAS>
-          <additionalCompilerOptions>-js-default-initializers=false;-source-map=true</additionalCompilerOptions>
+          <additionalCompilerOptions>-js-default-initializers=false;-js-complex-implicit-coercions=false;-js-vector-index-checks=false;-js-resolve-uncertain=false;-source-map=true</additionalCompilerOptions>
         </configuration>
       </plugin>
     </plugins>
diff --git a/frameworks/projects/Effects/pom.xml b/frameworks/projects/Effects/pom.xml
index 0967b0f..31d9d62 100644
--- a/frameworks/projects/Effects/pom.xml
+++ b/frameworks/projects/Effects/pom.xml
@@ -52,7 +52,7 @@
           </includeClasses>
           <skipExtern>true</skipExtern>
           <skipAS>${royale.skipAS}</skipAS>
-          <additionalCompilerOptions>-js-default-initializers=false;-source-map=true</additionalCompilerOptions>
+          <additionalCompilerOptions>-js-default-initializers=false;-js-complex-implicit-coercions=false;-js-vector-index-checks=false;-js-resolve-uncertain=false;-source-map=true</additionalCompilerOptions>
         </configuration>
       </plugin>
     </plugins>
diff --git a/frameworks/projects/Express/pom.xml b/frameworks/projects/Express/pom.xml
index e5d0bc1..ff870ae 100644
--- a/frameworks/projects/Express/pom.xml
+++ b/frameworks/projects/Express/pom.xml
@@ -63,7 +63,7 @@
           </includeFiles>
           <skipExtern>true</skipExtern>
           <skipAS>${royale.skipAS}</skipAS>
-          <additionalCompilerOptions>-js-default-initializers=false;-source-map=true;-include-lookup-only</additionalCompilerOptions>
+          <additionalCompilerOptions>-js-default-initializers=false;-js-complex-implicit-coercions=false;-js-vector-index-checks=false;-js-resolve-uncertain=false;-source-map=true;-include-lookup-only</additionalCompilerOptions>
         </configuration>
       </plugin>
     </plugins>
diff --git a/frameworks/projects/Flat/pom.xml b/frameworks/projects/Flat/pom.xml
index 0f8b8de..83dd347 100644
--- a/frameworks/projects/Flat/pom.xml
+++ b/frameworks/projects/Flat/pom.xml
@@ -64,7 +64,7 @@
           <includeLookupOnly>true</includeLookupOnly>
           <skipExtern>true</skipExtern>
           <skipAS>${royale.skipAS}</skipAS>
-          <additionalCompilerOptions>-js-default-initializers=false;-source-map=true</additionalCompilerOptions>
+          <additionalCompilerOptions>-js-default-initializers=false;-js-complex-implicit-coercions=false;-js-vector-index-checks=false;-js-resolve-uncertain=false;-source-map=true</additionalCompilerOptions>
         </configuration>
       </plugin>
     </plugins>
diff --git a/frameworks/projects/FontAwesome/pom.xml b/frameworks/projects/FontAwesome/pom.xml
index 342ca7b..bcbbc6d 100644
--- a/frameworks/projects/FontAwesome/pom.xml
+++ b/frameworks/projects/FontAwesome/pom.xml
@@ -64,7 +64,7 @@
           <includeLookupOnly>true</includeLookupOnly>
           <skipExtern>true</skipExtern>
           <skipAS>${royale.skipAS}</skipAS>
-          <additionalCompilerOptions>-js-default-initializers=false;-source-map=true</additionalCompilerOptions>
+          <additionalCompilerOptions>-js-default-initializers=false;-js-complex-implicit-coercions=false;-js-vector-index-checks=false;-js-resolve-uncertain=false;-source-map=true</additionalCompilerOptions>
         </configuration>
       </plugin>
     </plugins>
diff --git a/frameworks/projects/Formatters/pom.xml b/frameworks/projects/Formatters/pom.xml
index 9f443ac..baa34e3 100644
--- a/frameworks/projects/Formatters/pom.xml
+++ b/frameworks/projects/Formatters/pom.xml
@@ -52,7 +52,7 @@
           </includeClasses>
           <skipExtern>true</skipExtern>
           <skipAS>${royale.skipAS}</skipAS>
-          <additionalCompilerOptions>-js-default-initializers=false;-source-map=true</additionalCompilerOptions>
+          <additionalCompilerOptions>-js-default-initializers=false;-js-complex-implicit-coercions=false;-js-vector-index-checks=false;-js-resolve-uncertain=false;-source-map=true</additionalCompilerOptions>
         </configuration>
       </plugin>
     </plugins>
diff --git a/frameworks/projects/GoogleMaps/pom.xml b/frameworks/projects/GoogleMaps/pom.xml
index c35421a..dfb55ca 100644
--- a/frameworks/projects/GoogleMaps/pom.xml
+++ b/frameworks/projects/GoogleMaps/pom.xml
@@ -59,7 +59,7 @@
           </includeFiles>
           <skipExtern>true</skipExtern>
           <skipAS>${royale.skipAS}</skipAS>
-          <additionalCompilerOptions>-js-default-initializers=false;-source-map=true</additionalCompilerOptions>
+          <additionalCompilerOptions>-js-default-initializers=false;-js-complex-implicit-coercions=false;-js-vector-index-checks=false;-js-resolve-uncertain=false;-source-map=true</additionalCompilerOptions>
         </configuration>
       </plugin>
     </plugins>
diff --git a/frameworks/projects/Graphics/pom.xml b/frameworks/projects/Graphics/pom.xml
index acdd0f2..2624e9f 100644
--- a/frameworks/projects/Graphics/pom.xml
+++ b/frameworks/projects/Graphics/pom.xml
@@ -111,7 +111,7 @@
           </includeClasses>
           <skipExtern>true</skipExtern>
           <skipAS>${royale.skipAS}</skipAS>
-          <additionalCompilerOptions>-js-default-initializers=false;-source-map=true;-compiler.byte-array-embed-class=org.apache.royale.core.ByteArrayAsset</additionalCompilerOptions>
+          <additionalCompilerOptions>-js-default-initializers=false;-js-complex-implicit-coercions=false;-js-vector-index-checks=false;-js-resolve-uncertain=false;-source-map=true;-compiler.byte-array-embed-class=org.apache.royale.core.ByteArrayAsset</additionalCompilerOptions>
         </configuration>
       </plugin>
     </plugins>
diff --git a/frameworks/projects/HTML/pom.xml b/frameworks/projects/HTML/pom.xml
index a8b540b..e78b953 100644
--- a/frameworks/projects/HTML/pom.xml
+++ b/frameworks/projects/HTML/pom.xml
@@ -62,7 +62,7 @@
           </includeFiles>
           <skipExtern>true</skipExtern>
           <skipAS>${royale.skipAS}</skipAS>
-          <additionalCompilerOptions>-js-default-initializers=false;-source-map=true;-js-output-optimization=skipAsCoercions</additionalCompilerOptions>
+          <additionalCompilerOptions>-js-default-initializers=false;-js-complex-implicit-coercions=false;-js-vector-index-checks=false;-js-resolve-uncertain=false;-source-map=true;-js-output-optimization=skipAsCoercions</additionalCompilerOptions>
         </configuration>
       </plugin>
     </plugins>
diff --git a/frameworks/projects/HTML5/pom.xml b/frameworks/projects/HTML5/pom.xml
index 645ed81..7a0a1c8 100644
--- a/frameworks/projects/HTML5/pom.xml
+++ b/frameworks/projects/HTML5/pom.xml
@@ -58,7 +58,7 @@
           </includeFiles>
           <skipExtern>true</skipExtern>
           <skipAS>${royale.skipAS}</skipAS>
-          <additionalCompilerOptions>-js-default-initializers=false;-source-map=true</additionalCompilerOptions>
+          <additionalCompilerOptions>-js-default-initializers=false;-js-complex-implicit-coercions=false;-js-vector-index-checks=false;-js-resolve-uncertain=false;-source-map=true</additionalCompilerOptions>
         </configuration>
       </plugin>
     </plugins>
diff --git a/frameworks/projects/Icons/pom.xml b/frameworks/projects/Icons/pom.xml
index 2926f9e..bf7e965 100644
--- a/frameworks/projects/Icons/pom.xml
+++ b/frameworks/projects/Icons/pom.xml
@@ -66,7 +66,7 @@
           <skipExtern>true</skipExtern>
           <skipAS>${royale.skipAS}</skipAS>
           <!--<additionalCompilerOptions>-compiler.fxg-base-class=flash.display.Sprite</additionalCompilerOptions>-->
-          <additionalCompilerOptions>-js-default-initializers=false;-source-map=true</additionalCompilerOptions>
+          <additionalCompilerOptions>-js-default-initializers=false;-js-complex-implicit-coercions=false;-js-vector-index-checks=false;-js-resolve-uncertain=false;-source-map=true</additionalCompilerOptions>
         </configuration>
       </plugin>
       
diff --git a/frameworks/projects/JQuery/pom.xml b/frameworks/projects/JQuery/pom.xml
index b03fa6f..f890367 100644
--- a/frameworks/projects/JQuery/pom.xml
+++ b/frameworks/projects/JQuery/pom.xml
@@ -58,7 +58,7 @@
           </includeFiles>
           <skipExtern>true</skipExtern>
           <skipAS>${royale.skipAS}</skipAS>
-          <additionalCompilerOptions>-js-default-initializers=false;-source-map=true</additionalCompilerOptions>
+          <additionalCompilerOptions>-js-default-initializers=false;-js-complex-implicit-coercions=false;-js-vector-index-checks=false;-js-resolve-uncertain=false;-source-map=true</additionalCompilerOptions>
         </configuration>
       </plugin>
     </plugins>
diff --git a/frameworks/projects/Jewel/pom.xml b/frameworks/projects/Jewel/pom.xml
index 6cf4a3e..d35c59e 100644
--- a/frameworks/projects/Jewel/pom.xml
+++ b/frameworks/projects/Jewel/pom.xml
@@ -65,7 +65,7 @@
           <!--<allowSubclassOverrides>true</allowSubclassOverrides>-->
           <skipExtern>true</skipExtern>
           <skipAS>${royale.skipAS}</skipAS>
-          <additionalCompilerOptions>-js-default-initializers=false;-source-map=true</additionalCompilerOptions>
+          <additionalCompilerOptions>-js-default-initializers=false;-js-complex-implicit-coercions=false;-js-vector-index-checks=false;-js-resolve-uncertain=false;-source-map=true</additionalCompilerOptions>
         </configuration>
       </plugin>
       <plugin>
diff --git a/frameworks/projects/Language/pom.xml b/frameworks/projects/Language/pom.xml
index b39a33d..cab3539 100644
--- a/frameworks/projects/Language/pom.xml
+++ b/frameworks/projects/Language/pom.xml
@@ -46,7 +46,7 @@
           </includeClasses>
           <skipExtern>true</skipExtern>
           <skipAS>${royale.skipAS}</skipAS>
-          <additionalCompilerOptions>-js-default-initializers=false;-source-map=true</additionalCompilerOptions>
+          <additionalCompilerOptions>-js-default-initializers=false;-js-complex-implicit-coercions=false;-js-vector-index-checks=false;-js-resolve-uncertain=false;-source-map=true;-warn-instance-of-changes=false</additionalCompilerOptions>
         </configuration>
       </plugin>
     </plugins>
diff --git a/frameworks/projects/Language/src/main/royale/QName.as b/frameworks/projects/Language/src/main/royale/QName.as
index a0199ef..cdb01eb 100644
--- a/frameworks/projects/Language/src/main/royale/QName.as
+++ b/frameworks/projects/Language/src/main/royale/QName.as
@@ -117,12 +117,13 @@ package
 		COMPILE::JS
 		public function equals(name:QName):Boolean
 		{
-			return this.uri == name.uri && this.localName == name.localName; // this.prefix == name.prefix &&
+			return name != null && this.uri == name.uri && this.localName == name.localName; // this.prefix == name.prefix &&
 		}
 		
     	COMPILE::JS
 		public function matches(name:QName):Boolean
 		{
+			if (name == null) return this.localName == "*";
 			if(this.uri == "*" || name.uri == "*")
 				return this.localName == "*" || name.localName == "*" || this.localName == name.localName;
 
diff --git a/frameworks/projects/Language/src/main/royale/org/apache/royale/utils/Language.as b/frameworks/projects/Language/src/main/royale/org/apache/royale/utils/Language.as
index 5800347..0de85e8 100644
--- a/frameworks/projects/Language/src/main/royale/org/apache/royale/utils/Language.as
+++ b/frameworks/projects/Language/src/main/royale/org/apache/royale/utils/Language.as
@@ -19,179 +19,188 @@
 package org.apache.royale.utils
 {
 
-	[ExcludeClass]
-	COMPILE::SWF
-	public class Language {}
-
+    
+    [ExcludeClass]
+    COMPILE::SWF
+    public class Language
+    {
+    }
+    
     COMPILE::JS
     {
         import goog.bind;
         import goog.global;
+        import goog.DEBUG;
     }
     
     /**
      * @royaleignoreimport goog.bind
      * @royaleignoreimport goog.global
+     * @royalesuppressexport
      */
     COMPILE::JS
-	public class Language
-	{
-
-		//--------------------------------------
-		//   Static Property
-		//--------------------------------------
-
-		
-		/**
-		 * Helper var for sortOn
-		 */
-		static private var sortNames:Array;
-		static private var sortNamesOne:Array = [];
-		static private var muler:Number;
-		static private var zeroStr:String = String.fromCharCode(0);
-		
-		//--------------------------------------
-		//   Static Function
-		//--------------------------------------
-
-		/**
-		 * as()
-		 *
-		 * @param leftOperand The lefthand operand of the
-		 * binary as operator in AS3.
-		 * @param rightOperand The righthand operand of the
-		 * binary operator in AS3.
-		 * @param coercion The cast is a coercion,
-		 * throw exception if it fails.
-		 * @return Returns the lefthand operand if it is of the
-		 * type of the righthand operand, otherwise null.
-		 */
-		static public function as(leftOperand:Object, rightOperand:Object, coercion:* = null):Object
-		{
-			var error:Error, itIs:Boolean, message:String;
-
-			coercion = (coercion !== undefined) ? coercion : false;
-
-			itIs = Language.is(leftOperand, rightOperand);
-
-			if (!itIs && coercion && leftOperand)
-			{
-				message = 'Type Coercion failed';
-
-				if (TypeError)
-				{
-					error = new TypeError(message);
-				}
-				else
-				{
-					error = new Error(message);
-				}
-				throw error;
-			}
-
-			return (itIs) ? leftOperand : null;
-		}
-
-
-		/**
-		 * int()
-		 *
-		 * @param value The value to be cast.
-		 * @return {number}
-		 */
-		static public function _int(value:Number):Number
-		{
-			return value >> 0;
-		}
-
-		/**
-		 * string()
-		 * @param value The value to be cast.
-		 * @return {string}
-		 */
-		static public function string(value:*):String
-		{
-			if(value == null)
-			{
-				return null;
-			}
-			//toString() leads the compiler to emit type coercion,
-			//and concatenation is generally faster than String()
-			return "" + value;
-		}
-
-		/**
-		 * is()
-		 *
-		 * @param leftOperand The lefthand operand of the
-		 * binary as operator in AS3.
-		 * @param rightOperand The righthand operand of the
-		 * binary operator in AS3.
-		 * @return {boolean}
-		 */
-		static public function is(leftOperand:Object, rightOperand:Object):Boolean
-		{
-			var superClass:Object;
-
-			if (leftOperand == null || rightOperand == null)
-				return false;
-
+    public class Language
+    {
+        
+        
+        //--------------------------------------
+        //   Static Property
+        //--------------------------------------
+        
+        
+        /**
+         * Helper var for sortOn
+         */
+        static private var sortNames:Array;
+        static private var sortNamesOne:Array = [];
+        static private var muler:Number;
+        static private var zeroStr:String = String.fromCharCode(0);
+        
+        //--------------------------------------
+        //   Static Function
+        //--------------------------------------
+        
+        /**
+         * as()
+         *
+         * @param leftOperand The lefthand operand of the
+         * binary as operator in AS3.
+         * @param rightOperand The righthand operand of the
+         * binary operator in AS3.
+         * @param coercion The cast is a coercion,
+         * throw exception if it fails.
+         * @return Returns the lefthand operand if it is of the
+         * type of the righthand operand, otherwise null.
+         */
+        static public function as(leftOperand: Object, rightOperand: Object, coercion:* ):Object
+        {
+            const itIs:Boolean = Language.is(leftOperand, rightOperand);
+            
+            if (!itIs && !!coercion){
+                if (rightOperand.constructor === _synthType) {
+                    return rightOperand['coerce'](leftOperand)
+                }
+                else if ([Boolean,Number,String].indexOf(rightOperand) != -1) {
+                    return rightOperand(leftOperand);
+                }
+                else if (Object === rightOperand) {
+                    return rightOperand(leftOperand).valueOf();
+                }
+                if (leftOperand == null) {
+                    return null;
+                }
+                const leftType:String = '' + (leftOperand.ROYALE_CLASS_INFO ? leftOperand.ROYALE_CLASS_INFO.names[0].qName : String(leftOperand));
+                const rightType:String = '' + (rightOperand.prototype && rightOperand.prototype.ROYALE_CLASS_INFO ? rightOperand.prototype.ROYALE_CLASS_INFO.names[0].qName: String(rightOperand));
+                throw new TypeError('Error #1034: Type Coercion failed: cannot convert ' + leftType + ' to ' + rightType);
+            }
+            
+            return itIs ? leftOperand : null;
+        }
+        
+        /**
+         * int()
+         *
+         * @param value The value to be cast.
+         * @return {number}
+         */
+        static public function _int(value:Number):Number
+        {
+            return value >> 0;
+        }
+        
+        /**
+         * string()
+         * @param value The value to be cast.
+         * @return {string}
+         */
+        static public function string(value:*):String
+        {
+            if (value == null)
+            {
+                return null;
+            }
+            //toString() leads the compiler to emit type coercion,
+            //and concatenation is generally faster than String()
+            return "" + value;
+        }
+        
+        /**
+         * is()
+         *
+         * @param leftOperand The lefthand operand of the
+         * binary as operator in AS3.
+         * @param rightOperand The righthand operand of the
+         * binary operator in AS3.
+         * @return {boolean}
+         */
+        static public function is(leftOperand:Object, rightOperand: Object):Boolean
+        {
+            var superClass:Object;
+            
+            if (leftOperand == null || rightOperand == null)
+                return false;
+    
+            //Distinguish between Array and synthetic Vectors ('implemented' as Array-ish)
+            if (rightOperand === Array) {
+                return (Array.isArray(leftOperand) && !(SYNTH_TAG_FIELD in leftOperand));
+            }
+            
             if (leftOperand instanceof rightOperand)
                 return true;
+            
             if (rightOperand === Object)
                 return true; // every value is an Object in ActionScript except null and undefined (caught above)
             // A little faster to only call typeof once
-			var theType:String = typeof leftOperand;
-			//TODO This is actually incorrect for 'constructed' strings
-			// The correct way is using Object.prototype.toString.call(leftOperand) == '[object String]'
-			// But this is about 50 times slower than typeof
-			// "is String" should probably be pulled out into a separate function
-			// which is called directly by the compiler to deal with it in the most performant manner.
-			// Another (possibly better) option would be to have the compiler throw an error
-			// if new is used with String, Number or Boolean. If 'new' is not allowed, the typeof check is enough.
-			if (theType === 'string')
-				return rightOperand === String;
-
-			if (theType === 'number')
-				return rightOperand === Number;
-
+            var theType:String = typeof leftOperand;
+            //The following do not work for 'constructed' (e.g. new String('test')) Strings, Number or Booleans,
+            //but those cases are caught using the instanceof check elsewhere
+            if (theType === 'string')
+                return rightOperand === String;
+            
+            if (theType === 'number')
+            {
+                if (rightOperand === Number) return true;
+                //it is possible that rightOperand could be int or uint synthTypes... allow to proceed
+                //to the _synthType check
+            }
+            
             if (theType === 'boolean')
                 return rightOperand === Boolean;
-			//TODO add optimization to compiler to convert 'is Array' directly to Array.isArray
-            if (rightOperand === Array)
-                return Array.isArray(leftOperand);
-
-			if (leftOperand.ROYALE_CLASS_INFO === undefined)
-				return false; // could be a function but not an instance
-
-			if (leftOperand.ROYALE_CLASS_INFO.interfaces)
-			{
-				if (checkInterfaces(leftOperand, rightOperand))
-				{
-					return true;
-				}
-			}
-
-			superClass = leftOperand.constructor.superClass_;
-
-			if (superClass)
-			{
-				while (superClass && superClass.ROYALE_CLASS_INFO)
-				{
-					if (superClass.ROYALE_CLASS_INFO.interfaces)
-					{
-						if (checkInterfaces(superClass, rightOperand))
-						{
-							return true;
-						}
-					}
-					superClass = superClass.constructor.superClass_;
-				}
-			}
-
-			return false;
-		}
-
+    
+            if (rightOperand.constructor === _synthType)
+                return rightOperand['checkIs'](leftOperand);
+            
+            if (leftOperand.ROYALE_CLASS_INFO === undefined)
+                return false; // could be a function but not an instance
+            
+            if (leftOperand.ROYALE_CLASS_INFO.interfaces)
+            {
+                if (checkInterfaces(leftOperand, rightOperand))
+                {
+                    return true;
+                }
+            }
+            
+            superClass = leftOperand.constructor.superClass_;
+            
+            if (superClass)
+            {
+                while (superClass && superClass.ROYALE_CLASS_INFO)
+                {
+                    if (superClass.ROYALE_CLASS_INFO.interfaces)
+                    {
+                        if (checkInterfaces(superClass, rightOperand))
+                        {
+                            return true;
+                        }
+                    }
+                    superClass = superClass.constructor.superClass_;
+                }
+            }
+            
+            return false;
+        }
+        
         /**
          * Helper function for is()
          */
@@ -200,12 +209,15 @@ package org.apache.royale.utils
             var i:int, interfaces:Array;
             
             interfaces = leftOperand.ROYALE_CLASS_INFO.interfaces;
-            for (i = interfaces.length - 1; i > -1; i--) {
-                if (interfaces[i] === rightOperand) {
+            for (i = interfaces.length - 1; i > -1; i--)
+            {
+                if (interfaces[i] === rightOperand)
+                {
                     return true;
                 }
                 
-                if (interfaces[i].prototype.ROYALE_CLASS_INFO.interfaces) {
+                if (interfaces[i].prototype.ROYALE_CLASS_INFO.interfaces)
+                {
                     var isit:Boolean = checkInterfaces(interfaces[i].prototype, rightOperand);
                     if (isit) return true;
                 }
@@ -214,67 +226,49 @@ package org.apache.royale.utils
             return false;
         }
         
+        
         /**
-         * Implementation of "classDef is Class"
+         * @royaledebug
          */
-        public function isClass(classDef:*):Boolean
+        static public function trace(...rest):void
         {
-            return typeof classDef === 'function'
-                   && classDef.prototype
-                   && classDef.prototype.constructor === classDef;
-        }
+            var theConsole:*;
+            
+            theConsole = goog.global.console;
             
+            if (theConsole === undefined)
+            {
+                if (typeof window !== "undefined")
+                {
+                    theConsole = window.console;
+                } else if (typeof console !== "undefined")
+                {
+                    theConsole = console;
+                }
+            }
+            
+            try
+            {
+                if (theConsole && theConsole.log)
+                {
+                    theConsole.log.apply(theConsole, rest);
+                }
+            } catch (e:Error)
+            {
+                // ignore; at least we tried ;-)
+            }
+        }
+        
         /**
-         * Implementation of "classDef as Class"
+         * uint()
+         *
+         * @param value The value to be cast.
+         * @return {number}
          */
-        public function asClass(classDef:*):Class
+        static public function uint(value:Number):Number
         {
-            return isClass(classDef) ? classDef : null;
+            return value >>> 0;
         }
-        /**
-		 * @royaledebug
-		 */
-		static public function trace(...rest):void
-		{
-			var theConsole:*;
-
-			theConsole = goog.global.console;
-
-			if (theConsole === undefined)
-			{				
-				if(typeof window !== "undefined")
-				{
-					theConsole = window.console;
-				}
-				else if(typeof console !== "undefined")
-				{
-					theConsole = console;
-				}
-			}
-
-			try
-			{
-				if (theConsole && theConsole.log)
-				{
-					theConsole.log.apply(theConsole, rest);
-				}
-			}
-			catch (e:Error)
-			{
-				// ignore; at least we tried ;-)
-			}
-		}
-
-		/**
-		 * uint()
-		 *
-		 * @param value The value to be cast.
-		 * @return {number}
-		 */
-		static public function uint(value:Number):Number
-		{
-			return value >>> 0;
-		}
         
         /**
          * caches closures and returns the one closure
@@ -283,10 +277,14 @@ package org.apache.royale.utils
          * @param object The instance.
          * @param boundMethodName The name to use to cache the closure.
          * @return The closure.
+         *
+         * @royaleignorecoercion Function
          */
-        static public function closure(fn:Function, object:Object, boundMethodName:String):Function {
-            if (object.hasOwnProperty(boundMethodName)) {
-                return object[boundMethodName];
+        static public function closure(fn:Function, object:Object, boundMethodName:String):Function
+        {
+            if (object.hasOwnProperty(boundMethodName))
+            {
+                return object[boundMethodName] as Function;
             }
             var boundMethod:Function = goog.bind(fn, object);
             Object.defineProperty(object, boundMethodName, {
@@ -294,138 +292,882 @@ package org.apache.royale.utils
             });
             return boundMethod;
         };
-
+        
         /**
          * @param arr
          * @param names
          * @param opt
+         *
+         * @royaleignorecoercion Function
+         * @royalesuppressexport
          */
-        public static function sort(arr:Array,...args):void{
+        public static function sort(arr:Array, ...args):void
+        {
             var compareFunction:Function = null;
             var opt:int = 0;
             if (args.length == 1)
             {
                 if (typeof args[0] === "function")
-                    compareFunction = args[0];
+                    compareFunction = args[0] as Function;
                 else
                     opt = args[0];
-            }
-            else if (args.length == 2)
+            } else if (args.length == 2)
             {
-                compareFunction = args[0];
+                compareFunction = args[0] as Function;
                 opt = args[1];
             }
-                
-            muler = (Array.DESCENDING & opt) > 0?-1: 1;
+            
+            muler = (Array.DESCENDING & opt) > 0 ? -1 : 1;
             if (compareFunction)
                 arr.sort(compareFunction);
-            else if (opt & Array.NUMERIC){
+            else if (opt & Array.NUMERIC)
+            {
                 arr.sort(compareAsNumber);
-            }else if (opt & Array.CASEINSENSITIVE){
+            } else if (opt & Array.CASEINSENSITIVE)
+            {
                 arr.sort(compareAsStringCaseinsensitive);
-            }else{
+            } else
+            {
                 arr.sort(compareAsString);
             }
         }
         
-        private static function compareAsStringCaseinsensitive(a:Object, b:Object):int{
-            var v:int = (a||zeroStr).toString().toLowerCase().localeCompare((b||zeroStr).toString().toLowerCase());
-            if (v != 0){
-                return v*muler;
+        private static function compareAsStringCaseinsensitive(a:Object, b:Object):int
+        {
+            var v:int = (a || zeroStr).toString().toLowerCase().localeCompare((b || zeroStr).toString().toLowerCase());
+            if (v != 0)
+            {
+                return v * muler;
             }
             return 0;
         }
-        private static function compareAsString(a:Object, b:Object):int{
-            var v:int = (a||zeroStr).toString().localeCompare((b||zeroStr).toString());
-            if (v != 0){
-                return v*muler;
+        
+        private static function compareAsString(a:Object, b:Object):int
+        {
+            var v:int = (a || zeroStr).toString().localeCompare((b || zeroStr).toString());
+            if (v != 0)
+            {
+                return v * muler;
             }
-        return 0;
+            return 0;
         }
         
-        private static function compareAsNumber(a:Object, b:Object):int{
-            if (a>b){
+        private static function compareAsNumber(a:Object, b:Object):int
+        {
+            if (a > b)
+            {
                 return muler;
-            }else if (a<b){
+            } else if (a < b)
+            {
+                return -muler;
+            }
+            return 0;
+        }
+        
+        /**
+         * @param arr
+         * @param names
+         * @param opt
+         * @royalesuppressexport
+         */
+        public static function sortOn(arr:Array, names:Object, opt:Object = 0):void
+        {
+            if (names is Array)
+            {
+                sortNames = names as Array;
+            } else
+            {
+                sortNamesOne[0] = names;
+                sortNames = sortNamesOne;
+            }
+            if (opt is Array)
+            {
+                var opt2:int = 0;
+                for each(var o:int in opt)
+                {
+                    opt2 = opt2 | o;
+                }
+            } else
+            {
+                opt2 = /*opt as int*/ (int(opt) == opt) ? int(opt) : 0;
+            }
+            muler = (Array.DESCENDING & opt2) > 0 ? -1 : 1;
+            if (opt2 & Array.NUMERIC)
+            {
+                arr.sort(compareNumber);
+            } else if (opt2 & Array.CASEINSENSITIVE)
+            {
+                arr.sort(compareStringCaseinsensitive);
+            } else
+            {
+                arr.sort(compareString);
+            }
+        }
+        
+        private static function compareStringCaseinsensitive(a:Object, b:Object):int
+        {
+            for each(var n:String in sortNames)
+            {
+                var v:int = (a[n] || zeroStr).toString().toLowerCase().localeCompare((b[n] || zeroStr).toString().toLowerCase());
+                if (v != 0)
+                {
+                    return v * muler;
+                }
+            }
+            return 0;
+        }
+        
+        private static function compareString(a:Object, b:Object):int
+        {
+            for each(var n:String in sortNames)
+            {
+                var v:int = (a[n] || zeroStr).toString().localeCompare((b[n] || zeroStr).toString());
+                if (v != 0)
+                {
+                    return v * muler;
+                }
+            }
+            return 0;
+        }
+        
+        private static function compareNumber(a:Object, b:Object):int
+        {
+            for each(var n:String in sortNames)
+            {
+                if (a[n] > b[n])
+                {
+                    return muler;
+                } else if (a[n] < b[n])
+                {
                     return -muler;
+                }
             }
             return 0;
         }
+    
+    
+        /**
+         * no export (allow dead code elimination if never used):
+         * @royalesuppressexport
+         */
+        public static function resolveUncertain(val:*):*
+        {
+            if (val) {
+                var c:Class = val.constructor;
+                if (c == String || c == Number || c == Boolean || c.constructor == _synthType) val = val.valueOf();
+            }
+            return val;
+        }
         
-		/**
-		 * @param arr
-		 * @param names
-		 * @param opt
-		 */
-		public static function sortOn(arr:Array,names:Object,opt:Object=0):void{
-			if (names is Array){
-				sortNames = names as Array;
-			}else{
-				sortNamesOne[0] = names;
-				sortNames = sortNamesOne;
-			}
-			if (opt is Array){
-				var opt2:int = 0;
-				for each(var o:int in opt){
-					opt2 = opt2 | o;
-				}
-			}else{
-				opt2 = opt as int;
-			}
-			muler = (Array.DESCENDING & opt2) > 0?-1: 1;
-			if(opt2&Array.NUMERIC){
-				arr.sort(compareNumber);
-			}else if (opt2&Array.CASEINSENSITIVE){
-				arr.sort(compareStringCaseinsensitive);
-			}else{
-				arr.sort(compareString);
-			}
-		}
-		
-		private static function compareStringCaseinsensitive(a:Object, b:Object):int{
-			for each(var n:String in sortNames){
-				var v:int = (a[n]||zeroStr).toString().toLowerCase().localeCompare((b[n]||zeroStr).toString().toLowerCase());
-				if (v != 0){
-					return v*muler;
-				}
-			}
-			return 0;
-		}
-		private static function compareString(a:Object, b:Object):int{
-			for each(var n:String in sortNames){
-				var v:int = (a[n]||zeroStr).toString().localeCompare((b[n]||zeroStr).toString());
-				if (v != 0){
-					return v*muler;
-				}
-			}
-			return 0;
-		}
-		
-		private static function compareNumber(a:Object, b:Object):int{
-			for each(var n:String in sortNames){
-				if (a[n]>b[n]){
-					return muler;
-				}else if (a[n]<b[n]){
-					return -muler;
-				}
-			}
-			return 0;
-		}
-		
-		public static function Vector(size:int = 0, basetype:String = null):Array{
-			var arr:Array = [];
-			var defValue:Object = null;
-			if (basetype == "int" || basetype == "uint" || basetype == "Number")
-			{
-				defValue = 0;
-			}
-			else if (basetype == "String")
-			{
-				defValue = "";
-			}
-			for (var i:int = 0; i < size; i++)
-				arr.push(defValue);
-			return arr;
-		}
-	}
+        private static var _synthType:Class;
+        /**
+         * @royalesuppressexport
+         */
+        public static const SYNTH_TAG_FIELD:String = goog.DEBUG ? '_synthType' : '_s';
+        /**
+         * @royalesuppressexport
+         */
+        public static const CHECK_INDEX:String = goog.DEBUG ? 'chkIdx' : '_ci';
+    
+        /**
+         * @royalesuppressexport
+         */
+        public static function isSynthType(def:Object):Boolean{
+            return (_synthType && def && def.constructor == _synthType);
+        }
+    
+        /**
+         * Intended primarily for compiler-generated use only
+         * Low level class factory for synthetic types (native AS3 top-level classes that are final and do not have corresponding classes in javascript).
+         * Supports very light integration for emulation of related language level features, for construction, type-checking and coercion
+         * by default: supports int, uint and Class
+         * This Language method is only included in release build if it is used anywhere
+         * Supports a 'plugin' style addition of extra types beyond the basic defaults
+         *
+         * @royalesuppressresolveuncertain true, _synthType
+         * no export (allow dead code elimination if never used):
+         * @royalesuppressexport
+         */
+        public static function synthType(typeName:String, newDefinition:*):Class
+        {
+            //todo consider checking/using a fixed name reference to _synthType on goog.global as well - consider this for optimization in modules usage scenario
+            if (!_synthType)
+            {
+                var rtFunc:* = Function;
+                _synthType = rtFunc('return ' + 'function(b,c,d,e,n){var f=function(){var t=this;var a=Array.prototype.slice.call(arguments);a.push(t);t.type=f.type;t.value=f.construct.apply(t,a);return f.noWrap?t.value:t};f.type=b;f.toString=function(){return b};f.construct=c;f.checkIs=d;f.coerce=e;f.noWrap=!!n;var p=f.prototype;p.valueOf=function(){return this.value};p.constructor=f;f.constructor=arguments.callee;return f}')();
+              //_synthType = rtFunc('return ' + 'function(type,construct,check,coerce,noWrap){var f=function(){var t=this;var args=Array.prototype.slice.call(arguments);args.push(t);t.type=f.type;t.value=f.construct.apply(t,args);return f.noWrap?t.value:t};f.type=type;f.construct=construct;f.checkIs=check;f.coerce=coerce;f.noWrap=!!noWrap;f.prototype.valueOf=function(){return this.value};f.prototype.constructor=f;f.constructor=arguments.callee;return f}')();
+                Object.defineProperties(_synthType,
+                    {
+                        '_types': {
+                            value: {}
+                        }
+                    }
+                );
+            }
+            var typeStore:Object = _synthType['_types'];
+            if (newDefinition)
+            {
+                typeStore[typeName] = new _synthType(typeName, newDefinition['construct'], newDefinition['checkIs'], newDefinition['coerce'], newDefinition['noWrap']);
+            }
+            
+            var snythTypeInst:Class = typeStore[typeName];
+            if (!snythTypeInst)
+            {
+                switch (typeName)
+                {
+                    case 'int':
+                        snythTypeInst = typeStore['int'] = new _synthType('int', Language._int, function (v:Number):Boolean
+                        {
+                            return v >> 0 === v.valueOf()
+                        }, Language._int); //unfortunately, noWrap is not a viable option here, because it is a primitive type
+                        break;
+                    case 'uint':
+                        snythTypeInst = typeStore['uint'] = new _synthType('uint', Language.uint, function (v:Number):Boolean
+                        {
+                            return v >>> 0 === v.valueOf()
+                        }, Language.uint); //unfortunately, noWrap is not a viable option here, because it is a primitive type
+                        break;
+                    case 'Class':
+                        const excludeName:RegExp = /^name$|^name,|,name$|,name(?=,)/;
+                        const isFunc:String  = Object.getOwnPropertyNames(function():void {}).join().replace(excludeName,'');
+                        const classCheck:Function =  function (v:*):Boolean
+                        {
+                            return typeof v == 'function'
+                                    && v.prototype
+                                    && v.prototype['constructor'] == v
+                                    && (v.prototype.ROYALE_CLASS_INFO || v.constructor == _synthType || Object.getOwnPropertyNames(v).join().replace(excludeName,'') != isFunc )
+                        };
+                        snythTypeInst = typeStore['Class'] = new _synthType('Class',
+                                function():void{throw new TypeError('Error #1115: Class is not a constructor.')},
+                                classCheck,
+                                function(v:*):*{if (v != null && !classCheck(v)) throw new TypeError('Error #1034: Type Coercion failed: cannot convert "'+ string(v) +'" to Class.') ; return v ? v : null });
+                        break;
+                    default:
+                        throw new TypeError('unknown synthetic type:' + typeName);
+                        break;
+                }
+            }
+            return snythTypeInst;
+        }
+    
+        /**
+         * Intended primarily for compiler-generated use only
+         * Adds Vector support via synthType
+         * Acts like a class Factory for Vector subclasses as synthTypes, which provides correct type-checking behaviour
+         * Uses cached lookups and 'plugin' style addition of synthTypes for each distinct requested Vector subclass type
+         *
+         * @royaleignorecoercion Array
+         * no export (allow dead code elimination if never used):
+         * @royalesuppressexport
+         */
+        public static function synthVector(elementType:String):Class
+        {
+            var typeName:String = 'Vector';
+            if (elementType !== null) typeName += '.<' + elementType + '>';
+            const synth:Function = synthType;
+            if (!_synthType || !_synthType['_types'][typeName])
+            {
+                
+                //create a new synthType representing the parameterized type
+                //provides a concrete example of the plugin/external definition approach for synthType:
+                var type:Class = synth(typeName, {
+                    'construct': function (size:int, fixed:Boolean, instance:Object):Array
+                    {
+                        const a:Array = arguments;
+                        var l:Number = a.length;
+                        instance = a[--l];
+                        fixed = l == 2 ? a[--l] : false;
+                        size = l == 1 ? a[0] : 0;
+                        instance['type'] = typeName;
+                        instance[VectorSupport.FIXED_LEN] = fixed ? size : -1;
+                        return VectorSupport.arrayVector([], size, elementType, fixed, instance);
+                    },
+                    'checkIs': function (v:Array):Boolean
+                    {
+                        return VectorSupport.checkIsVector(v, typeName);
+                    },
+                    'coerce': function (source:*):Array
+                    {
+                        if (source && Array.isArray(source))
+                        {
+                            var arr:Array = source as Array;
+                            return VectorSupport.checkIsVector(arr, typeName)
+                                    ? arr
+                                    : VectorSupport.arrayVector(arr.slice(), arr.length, elementType, false, null, false);
+                        }
+                        throw new TypeError('Error #1034: Type Coercion failed: cannot convert ' + source + ' to ' + typeName);
+                    },
+                    'noWrap': true
+                });
+                VectorSupport.langSynthType = _synthType;
+                VectorSupport.vectorElementCoercion(elementType, type, false);
+                VectorSupport.vectorElementDefault(elementType, type);
+                type.prototype = Object.create(type.prototype);
+                const baseVectorOverrides:Object = VectorSupport.getBaseOverrides();
+                const localOverrides:Object ={
+                    'length': {
+                        'get': baseVectorOverrides.get_len,
+                        'set':baseVectorOverrides.set_len
+                    },
+                    'toString': { value:baseVectorOverrides.toString },
+                    'map': { value:baseVectorOverrides.map },
+                    'splice': { value:baseVectorOverrides.splice },
+                    'slice': { value:baseVectorOverrides.slice },
+                    'concat': { value:baseVectorOverrides.concat },
+                    'filter': { value:baseVectorOverrides.filter },
+                    'insertAt': { value:baseVectorOverrides.uncheckedInsertAt },
+                    'removeAt': { value:baseVectorOverrides.uncheckedRemoveAt },
+                    'constructor': { value:type }
+                };
+                localOverrides[Language.CHECK_INDEX] = {value:baseVectorOverrides[Language.CHECK_INDEX]};
+                localOverrides[VectorSupport.ELEMENT_TYPE] = { value: elementType };
+                localOverrides['type'] = { value: typeName };
+                localOverrides[VectorSupport.COERCE_ELEMENT] = { value: type[VectorSupport.COERCE_ELEMENT], configurable: true};
+                localOverrides[VectorSupport.DEFAULT_VALUE] = {  value: type[VectorSupport.DEFAULT_VALUE] };
+                Object.defineProperties(type.prototype, localOverrides)
+
+            }
+            return _synthType['_types'][typeName];
+        }
+        
+        
+        /**
+         * A light wrapper around a Vector constructor call that has an untyped return type
+         * (because the resulting type is unknown at compile time)
+         * This could be used to create and return a default Vector instance
+         *
+         * @royaleignorecoercion Array
+         * no export (allow dead code elimination if never used):
+         * @royalesuppressexport
+         */
+        public static function Vector(size:int = 0, baseType:String = null, fixed:Boolean = false):*
+        {
+            var vectorClass:Class = synthVector(baseType);
+            return new vectorClass(size, fixed) as Array;
+        }
+    
+        /**
+         * Support for legacy vectorEmulationClass=Array approach.
+         *
+         * no export (allow dead code elimination if never used):
+         * @royalesuppressexport
+         */
+        public static function arrayAsVector(size:int = 0, baseType:String = null):Array
+        {
+            var arr:Array = [];
+            var defValue:Object = null;
+            if (baseType == "int" || baseType == "uint" || baseType == "Number") {
+                defValue = 0;
+            }
+            else if (baseType == "String"){
+                defValue = "";
+            } else if (baseType == "Boolean"){
+                defValue = false;
+            }
+            for (var i:int = 0; i < size; i++)
+                    arr.push(defValue);
+            return arr;
+        }
+        
+    }
+    
+}
+
+import org.apache.royale.utils.Language;
+import goog.DEBUG;
+import goog.global;
+
+COMPILE::JS
+/**
+ * @royalesuppressexport
+ */
+class VectorSupport {
+
+    //Warning : code in this class is very dependent on non-generation of closures and possibly other 'quirks'
+    //If you make any changes, please verify this against Vector unit tests, across different targets
+    
+    /**
+     * @royalesuppressexport
+     */
+    public static const fixedRangeError:String = 'Error #1126: Cannot change the length of a fixed Vector';
+    /**
+     * @royalesuppressexport
+     */
+    public static const nonConstructorError:String = 'Error #1007: Instantiation attempted on a non-constructor.';
+    /**
+     * @royalesuppressexport
+     */
+    public static var langSynthType:Object;
+    
+    /**
+     * @royalesuppressexport
+     */
+    public static const COERCE_ELEMENT:String = goog.DEBUG ? 'coerceElement' : 'cE';
+    /**
+     * @royalesuppressexport
+     */
+    public static const DEFAULT_VALUE:String = goog.DEBUG ? 'defaultValue' : 'dV';
+    /**
+     * @royalesuppressexport
+     */
+    public static const ELEMENT_TYPE:String = goog.DEBUG ? 'elementType' : 'eT';
+    /**
+     * @royalesuppressexport
+     */
+    public static const FIXED_LEN:String = goog.DEBUG ? 'fixedLen' : 'fL';
+    
+    private static function indexRangerError(index:Number, limit:uint):String{
+        return 'Error #1125: The index ' + index + ' is out of range ' + limit;
+    }
+    
+    /**
+     * internal use only: v should be an Array. 
+     * @royalesuppressexport
+     */
+    public static function checkIsVector(v:Object, typeName:String):Boolean
+    {
+        const base:Boolean = v && Language.SYNTH_TAG_FIELD in v;
+        var ret:Boolean = base &&  v[Language.SYNTH_TAG_FIELD] instanceof langSynthType['_types'][typeName];
+        if (!ret && base && typeName == "Vector.<*>") {
+            // int, uint and Number Vectors do not also resolve to '*' typed Vectors, but all others do
+            const elementType:String = v[Language.SYNTH_TAG_FIELD][ELEMENT_TYPE];
+            ret = elementType != 'int' && elementType != 'uint' && elementType != 'Number';
+        }
+        return ret;
+    }
+    /**
+     * @royalesuppressexport
+     */   
+    public static function vectorElementDefault(elementType:String, synthVectorClass:Object ):Object {
+        if (synthVectorClass[VectorSupport.DEFAULT_VALUE] !== undefined) return synthVectorClass[VectorSupport.DEFAULT_VALUE];
+        const standardDefaults:Object = {
+            'int': 0,
+            'uint': 0,
+            'Number': 0,
+            'String': '',
+            'Boolean': false
+        };
+        var defaultVal:Object = null;
+        if (elementType in standardDefaults) {
+            defaultVal = standardDefaults[elementType];
+        }
+        synthVectorClass[VectorSupport.DEFAULT_VALUE] = defaultVal;
+        return defaultVal;
+    }
+    
+    /**
+     *
+     * @royaleignorecoercion Function      
+     * @royalesuppressexport
+     */
+    public static function vectorElementCoercion(elementType:String, synthVectorClass:Object, deferred:Boolean):Function{
+        if (synthVectorClass[VectorSupport.COERCE_ELEMENT]) return synthVectorClass[VectorSupport.COERCE_ELEMENT] as Function;
+        const identity:Function = function(v:*):Object{return v === undefined ? null : v};
+        const standardCoercions:Object = {
+            'int': Language._int,
+            'uint': Language.uint,
+            'Number': Number,
+            'String': Language.string,
+            'Boolean': Boolean,
+            "*": identity,
+            "Object": identity
+        };
+        var coercion:Function
+        if (elementType == 'Class') {
+            coercion = Language.synthType('Class', null)['coerce'];
+        }
+        else coercion= standardCoercions[elementType] as Function;
+        if (coercion == null) {
+            if (elementType.indexOf('Vector.<') == 0) {
+                coercion = function(v:Object):Object{ if (!(v === null || Language.synthVector(elementType.slice(8,-1))['checkIs'](v))) {throw new TypeError('Error #1034: Type Coercion failed: cannot convert ' + v + ' to '+ elementType)} else return v  };
+            } else {
+                var defer:Boolean = false;
+                var parts:Array = elementType.split('.');
+                var n:int = parts.length;
+                var o:Class = goog.global;
+                for (var i:int = 0; i < n; i++) {
+                    o = o && o[parts[i]];
+                    if (!o) {
+                        if (deferred) throw new TypeError('missing dependency ' + elementType );
+                        defer = true;
+                        break;
+                    }
+                }
+                if (defer) {
+                    coercion = null;
+                }
+                else coercion = function(v:Object):Object{ return Language.as(v,o,true)};
+            }
+        }
+        synthVectorClass[VectorSupport.COERCE_ELEMENT] = coercion;
+        if (deferred) {
+            //patch the prototype
+            Object.defineProperty(synthVectorClass.prototype, VectorSupport.COERCE_ELEMENT, {value: coercion})
+        }
+        return coercion;
+    }
+    
+    /**
+     * internal use only. arr should be an Array
+     * @royaleignorecoercion Array
+     * @royaleignorecoercion Function
+     */
+    private static function coerceElements(arr:Object, size:uint, tag:Object):Error{
+        var coercion:Function = tag[COERCE_ELEMENT] as Function;
+        if (coercion == null) {
+            coercion = VectorSupport.vectorElementCoercion(tag[ELEMENT_TYPE], tag.constructor, true);
+        }
+        var err:Error;
+        for (var i:int = 0; i < size; i++)
+        {
+            var original:* = (arr as Array)[i];
+            //observed: undefined gets coerced to null even on * typed Vectors...
+            if (original === undefined) original = null;
+            try{
+                arr[i] = coercion(original);
+            } catch(e:Error) {
+                //avm does this anyway:
+                const defValue:Object = tag[DEFAULT_VALUE];
+                array_fill(arr as Array, defValue,i);
+                err = e;
+                break;
+            }
+        }
+        return err;
+    }
+    
+    /**
+     * @royaleignorecoercion Function
+     * @royalesuppressexport
+     */
+    public static function arrayVector(arr:Array, size:int, basetype:String,fixed:Boolean , tag:Object, construct:Boolean = true):Array
+    {
+        size = size >>>0;
+        if (basetype == null)
+        {
+            throw new TypeError(nonConstructorError);
+        }
+        
+        tagVectorArray(arr, basetype, fixed, tag);
+        if (!tag) tag = arr[Language.SYNTH_TAG_FIELD];
+        if (size)
+        {
+            if (construct)
+            {
+                arr.length = size;
+                const defValue:Object = tag[DEFAULT_VALUE];
+                array_fill(arr, defValue,0);
+            } else
+            { //coerce
+                const err:Error = coerceElements(arr, size, tag);
+                if (err) throw new (err.constructor)(err.message);
+            }
+        }
+        return arr;
+    }
+    /**
+     * @royalesuppressexport
+     * @royalesuppressclosure
+     */    
+    public static function tagVectorArray(array:Array, elementType:String, fixed:Boolean, inst:Object):Array
+    {
+        const vectorType:String ='Vector.<' + elementType + '>';
+        const synthVectorClass:Class = inst ? inst.constructor : langSynthType['_types'][vectorType];
+        if (!inst) inst = new synthVectorClass()[Language.SYNTH_TAG_FIELD];
+        inst.value = array;
+        //IE11 does not support Object.assign
+        const blend:Function = Object.assign || function(target:Object, source:Object):Object{ for (var field:String in source) {target[field] = source[field]} return target};
+        //enumerable is false by default
+        const props:Object = {
+            'fixed': {
+                'get' : function():Boolean{return inst[FIXED_LEN] > -1},
+                'set' : function(v:Boolean):void{
+                    if (inst[FIXED_LEN] > -1 != v) {
+                        inst[FIXED_LEN]= (v ? array.length : -1);
+                        Object.defineProperties(array,getMutationTypeSafetyOverrides(v));
+                    }
+                }
+            },
+            'splice': {
+                value: inst.splice
+            },
+            'slice': {
+                value: inst.slice
+            },
+            'concat': {
+                value: inst.concat
+            },
+            'map': {
+                value: inst.map
+            },
+            'filter': {
+                value: inst.filter
+            },
+            'toString':{
+                value: inst.toString
+            },
+            'constructor': {
+                value: inst.constructor
+            }
+        };
+        props[Language.CHECK_INDEX] = {
+            value: inst[Language.CHECK_INDEX]
+        };
+        props[Language.SYNTH_TAG_FIELD] = {
+            value: inst
+        };
+        blend(props, getMutationTypeSafetyOverrides(fixed));
+        Object.defineProperties (array, props);
+        return array;
+    }
+    
+    
+    /**
+     * Fills the array from a start point (defaults to zero) to its end with the specified value
+     */
+    private static function array_fill(arr:Array, value:Object, start:uint):Array{
+        if (arr['fill']) {
+            return arr['fill'](value, start);
+        } else {
+            //IE11 support
+            var i:uint = start>>>0;
+            const l:uint = arr.length;
+            while (i<l) {
+                arr[i] = value;
+                i++;
+            }
+        }
+        return arr;
+    }
+    
+    //The instance methods of this class are primarily a source for runtime patching of 'Vector-like' Arrays
+    //The class uses @royalesuppressclosure to avoid the royale compiler generating closures and therefore references to 'this'
+    //in the local methods can become references to the Array instance itself in its patched methods
+    //with the exception of the get_len and set_len methods where 'this' refers to the instance of the 'synthType' tag
+    //attached to the  Array that is considered 'Vector-like'
+    
+    private static var _instance:VectorSupport;
+    private static var _baseObject:Object;
+    /**
+     * @royalesuppressexport
+     * prevent closure generation for the method references:
+     * @royalesuppressclosure
+     */
+    public static function getBaseOverrides():Object{
+        if (_baseObject) return _baseObject;
+        _instance = new VectorSupport();
+        _baseObject = {};
+        var inst:VectorSupport = _instance;
+        _baseObject.toString = inst.toString;
+        _baseObject.map = inst.map;
+        _baseObject.splice = inst.splice;
+        _baseObject.slice = inst.slice;
+        _baseObject.concat = inst.concat;
+        _baseObject.filter = inst.filter;
+        _baseObject.uncheckedInsertAt = inst.uncheckedInsertAt;
+        _baseObject.uncheckedRemoveAt = inst.uncheckedRemoveAt;
+        _baseObject.get_len = inst.get_len;
+        _baseObject.set_len = inst.set_len;
+        _baseObject[Language.CHECK_INDEX] = inst.chkIdx;
+        return _baseObject;
+    }
+    
+    private static var _nonFixedTypeSafetyOverrides:Object;
+    private static var _fixedTypeSafetyOverrides:Object;
+    /**
+     * @royalesuppressexport
+     * @royalesuppressclosure
+     */
+    public static function getMutationTypeSafetyOverrides(fixed:Boolean):Object{
+        if (_nonFixedTypeSafetyOverrides) return fixed ? _fixedTypeSafetyOverrides : _nonFixedTypeSafetyOverrides;
+        var inst:VectorSupport = _instance;
+        _nonFixedTypeSafetyOverrides = {
+            'pop': {
+                value:Array.prototype.pop,
+                configurable: true
+            },
+            'push': {
+                value:inst.push,
+                configurable: true
+            },
+            'shift': {
+                value:Array.prototype.shift,
+                configurable: true
+            },
+            'unshift': {
+                value:inst.unshift,
+                configurable: true
+            },
+            'insertAt': {
+                value:inst.insertAt,
+                configurable: true
+            },
+            'removeAt': {
+                value:inst.removeAt,
+                configurable: true
+            }
+        };
+        const error:Object = {
+            value:inst.throwRangeError,
+            configurable: true
+        };
+        _fixedTypeSafetyOverrides ={
+            'pop': error,
+            'push': error,
+            'shift': error,
+            'unshift': error,
+            'insertAt': error,
+            'removeAt': error
+        };
+        return fixed ? _fixedTypeSafetyOverrides : _nonFixedTypeSafetyOverrides;
+    }
+    /**
+     * @royalesuppressexport
+     */   
+    public function  toString():String{
+        return Array.prototype.map.call(this, String).toString();
+    }
+    /**
+     * @royaleignorecoercion Array
+     * @royalesuppressexport
+     */
+    public function map(callback:Function):* {
+        var inst:Object= this[Language.SYNTH_TAG_FIELD]; return tagVectorArray(Array.prototype.map.call(this, function(item:Object, index:int, source:*):Object{return inst[COERCE_ELEMENT](callback(item,index,source))}) as Array, inst[ELEMENT_TYPE],false,null);
+    }
+    /**
+     * @royaleignorecoercion Array
+     * @royalesuppressexport
+     */
+    public function splice():* {
+        var a:Array = Array.prototype.slice.call(arguments) as Array;var inst:Object= this[Language.SYNTH_TAG_FIELD]; var ret:Array = Array.prototype.splice.apply(this, a) as Array; if (inst[FIXED_LEN] > -1) inst[FIXED_LEN] = this['length']; return tagVectorArray(ret, inst[ELEMENT_TYPE], false, null);
+    }
+    
+    /**
+     * @royaleignorecoercion Array
+     * @royalesuppressexport
+     */
+    public function slice():* {
+        var a:Array = Array.prototype.slice.call(arguments) as Array;var inst:Object= this[Language.SYNTH_TAG_FIELD]; var ret:Array = Array.prototype.slice.apply(this, a) as Array; return tagVectorArray(ret, inst[ELEMENT_TYPE], false, null);
+    }
+    
+    /**
+     * @royaleignorecoercion Array
+     * @royalesuppressexport
+     */
+    public function filter():* {
+        var a:Array = Array.prototype.slice.call(arguments) as Array;var inst:Object= this[Language.SYNTH_TAG_FIELD]; var ret:Array = Array.prototype.filter.apply(this, a) as Array; return tagVectorArray(ret, inst[ELEMENT_TYPE], false, null);
+    }
+    
+    /**
+     * @royaleignorecoercion Array
+     * @royaleignorecoercion String
+     * @royalesuppressexport
+     */
+    public function concat():* {
+        var a:Array = Array.prototype.slice.call(arguments) as Array;var inst:Object = this[Language.SYNTH_TAG_FIELD];
+        var l:uint = a.length;
+        for (var i:int = 0; i<l; i++) {
+            var contender:Array = a[i] as Array;
+            if (!checkIsVector(contender, inst['type'] as String)) {
+                throw new TypeError('Error #1034: Type Coercion failed: cannot convert ' + contender[Language.SYNTH_TAG_FIELD]['type'] + ' to ' + inst['type']);
+            }
+        }
+        var ret:Array = Array.prototype.concat.apply(this, a) as Array;
+        return tagVectorArray(ret,inst[ELEMENT_TYPE], false, null);
+    }
+    /**
+     * @royalesuppressexport
+     */
+    public function uncheckedInsertAt(index:Number,item:*):* {
+        return Array.prototype.splice.call(this, index, 0, item);
+    }
+    /**
+     * @royalesuppressexport
+     */
+    public function uncheckedRemoveAt(index:Number):* {
+        return Array.prototype.splice.call(this, index, 1)[0];
+    }
+    /**
+     * @royalesuppressexport
+     */
+    public function get_len():Number{
+        //'this' inside here is the synthType instance. It has a value property that refers to the
+        //Array instance that it 'tags'
+        return this['value'].length
+    }
+    /**
+     * @royaleignorecoercion Array
+     * @royalesuppressexport
+     */
+    public function set_len(value:Number):void{
+        //'this' here is the synthType instance. It has a value property that refers to the
+        //Array instance that it 'tags'
+        if (this[FIXED_LEN] != -1) {
+            throw new RangeError(fixedRangeError)
+        } else {
+            var oldLen:Number = this['value'].length;
+            this['value'].length = value;
+            if (oldLen < value) {
+                array_fill(this['value'] as Array, this[DEFAULT_VALUE], oldLen);
+            }
+        }
+    }
+    
+    //fixed-length vector-like array overrides
+    /**
+     * @royaleignorecoercion Array
+     * @royalesuppressexport
+     */
+    public function push(v:*):* {
+        var a:Array = Array.prototype.slice.call(arguments) as Array;
+        const err:Error = coerceElements(a, a.length, this[Language.SYNTH_TAG_FIELD]);
+        var len:uint = Array.prototype.push.apply(this,a);
+        if (err) throw new (err.constructor)(err.message);
+        return len;
+    }
+    /**
+     * @royaleignorecoercion Array
+     * @royalesuppressexport
+     */
+    public function unshift(v:*):* {
+        var a:Array = Array.prototype.slice.call(arguments) as Array;
+        const err:Error = coerceElements(a, a.length, this[Language.SYNTH_TAG_FIELD]);
+        var len:uint = Array.prototype.unshift.apply(this,a);
+        if (err) throw new (err.constructor)(err.message);
+        return len;
+    }
+    /**
+     * @royalesuppressexport
+     */
+    public function insertAt(index:int, item:*):void {
+        this[Language.SYNTH_TAG_FIELD]['insertAt'].call(this,index,item);
+    }
+    /**
+     * @royalesuppressexport
+     */
+    public function removeAt(index:int):Object {
+        const idx:int = index < 0 ? Math.max(this['length'] + index, 0) : index;
+        if (idx >= this['length']) throw new RangeError(indexRangerError(index, this['length']));
+        return this[Language.SYNTH_TAG_FIELD]['removeAt'].call(this, idx);
+    }
+    /**
+     * @royalesuppressexport
+     */
+    public function throwRangeError():void{
+        throw new RangeError(fixedRangeError);
+    }
+    
+    /**
+     * @royalesuppressexport
+     */
+    public function chkIdx(index:Number):Number {
+        var limit:Number = this[Language.SYNTH_TAG_FIELD][FIXED_LEN];
+        var fail:Boolean = index >>> 0 !== index; //fail if not a uint value (also covers negative value range check)
+        fail ||= ((limit == -1) ? (index > (limit = this['length'])) : (index >= limit)); //fail if not below length limit (possibly fixed)
+        if (fail) {
+            throw new RangeError(indexRangerError(index, limit));
+        }
+        return index;
+    }
+    
 }
diff --git a/frameworks/projects/MXRoyale/pom.xml b/frameworks/projects/MXRoyale/pom.xml
index 9399533..13e0dd6 100644
--- a/frameworks/projects/MXRoyale/pom.xml
+++ b/frameworks/projects/MXRoyale/pom.xml
@@ -73,7 +73,7 @@
               </define>
           </defines>
           <allowSubclassOverrides>true</allowSubclassOverrides>
-          <additionalCompilerOptions>-js-default-initializers=false;-source-map=true;-js-compiler-define=COMPILE::JS,true;-js-compiler-define=COMPILE::SWF,false;-js-compiler-define=GOOG::DEBUG,goog.DEBUG;-js-compiler-define=ROYALE::DISPLAYOBJECT,IUIComponent;-js-compiler-define=ROYALE::PROXYVISIBILITY,public;-namespace+=http://ns.adobe.com/mxml/2009,${project.basedir}/../../mxml-2009-manifest.xml;-compiler.js-namespaces.namespace+=http://ns.adobe.com/mxml/2009,${project.basedir}/../../mx [...]
+          <additionalCompilerOptions>-js-default-initializers=false;-js-complex-implicit-coercions=false;-js-vector-index-checks=false;-js-resolve-uncertain=false;-source-map=true;-js-compiler-define=COMPILE::JS,true;-js-compiler-define=COMPILE::SWF,false;-js-compiler-define=GOOG::DEBUG,goog.DEBUG;-js-compiler-define=ROYALE::DISPLAYOBJECT,IUIComponent;-js-compiler-define=ROYALE::PROXYVISIBILITY,public;-namespace+=http://ns.adobe.com/mxml/2009,${project.basedir}/../../mxml-2009-manifest.x [...]
         </configuration>
       </plugin>
     </plugins>
diff --git a/frameworks/projects/MaterialDesignLite/pom.xml b/frameworks/projects/MaterialDesignLite/pom.xml
index ba6a839..71254da 100644
--- a/frameworks/projects/MaterialDesignLite/pom.xml
+++ b/frameworks/projects/MaterialDesignLite/pom.xml
@@ -64,7 +64,7 @@
           <includeLookupOnly>true</includeLookupOnly>
           <skipExtern>true</skipExtern>
           <skipAS>${royale.skipAS}</skipAS>
-          <additionalCompilerOptions>-js-default-initializers=false;-source-map=true</additionalCompilerOptions>
+          <additionalCompilerOptions>-js-default-initializers=false;-js-complex-implicit-coercions=false;-js-vector-index-checks=false;-js-resolve-uncertain=false;-source-map=true</additionalCompilerOptions>
         </configuration>
       </plugin>
     </plugins>
diff --git a/frameworks/projects/Mobile/pom.xml b/frameworks/projects/Mobile/pom.xml
index 6f9f114..f531364 100644
--- a/frameworks/projects/Mobile/pom.xml
+++ b/frameworks/projects/Mobile/pom.xml
@@ -62,7 +62,7 @@
           </includeFiles>
           <skipExtern>true</skipExtern>
           <skipAS>${royale.skipAS}</skipAS>
-          <additionalCompilerOptions>-js-default-initializers=false;-source-map=true</additionalCompilerOptions>
+          <additionalCompilerOptions>-js-default-initializers=false;-js-complex-implicit-coercions=false;-js-vector-index-checks=false;-js-resolve-uncertain=false;-source-map=true</additionalCompilerOptions>
         </configuration>
       </plugin>
     </plugins>
diff --git a/frameworks/projects/Network/pom.xml b/frameworks/projects/Network/pom.xml
index 7d8691e..52ed08a 100644
--- a/frameworks/projects/Network/pom.xml
+++ b/frameworks/projects/Network/pom.xml
@@ -52,7 +52,7 @@
           </includeClasses>
           <skipExtern>true</skipExtern>
           <skipAS>${royale.skipAS}</skipAS>
-          <additionalCompilerOptions>-js-default-initializers=false;-source-map=true;-warn-instance-of-changes=false</additionalCompilerOptions>
+          <additionalCompilerOptions>-js-default-initializers=false;-js-complex-implicit-coercions=false;-js-vector-index-checks=false;-js-resolve-uncertain=false;-source-map=true;-warn-instance-of-changes=false</additionalCompilerOptions>
         </configuration>
       </plugin>
     </plugins>
diff --git a/frameworks/projects/Reflection/pom.xml b/frameworks/projects/Reflection/pom.xml
index bab3bb5..2370892 100644
--- a/frameworks/projects/Reflection/pom.xml
+++ b/frameworks/projects/Reflection/pom.xml
@@ -47,10 +47,12 @@
               <manifest>${project.basedir}/src/main/resources/basic-manifest.xml</manifest>
             </namespace>
           </namespaces>
-          <includeSources>true</includeSources>
+          <includeClasses>
+            <includeClass>ReflectionClasses</includeClass>
+          </includeClasses>
           <skipExtern>true</skipExtern>
           <skipAS>${royale.skipAS}</skipAS>
-          <additionalCompilerOptions>-js-default-initializers=false;-source-map=true</additionalCompilerOptions>
+          <additionalCompilerOptions>-js-default-initializers=false;-js-complex-implicit-coercions=false;-js-vector-index-checks=false;-js-resolve-uncertain=false;-source-map=true</additionalCompilerOptions>
         </configuration>
       </plugin>
     </plugins>
@@ -71,6 +73,20 @@
       <type>swc</type>
       <classifier>js</classifier>
     </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Language</artifactId>
+      <version>0.9.6-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>swf</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Language</artifactId>
+      <version>0.9.6-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>js</classifier>
+    </dependency>
   </dependencies>
 
 </project>
diff --git a/frameworks/projects/Reflection/src/main/config/compile-swf-config.xml b/frameworks/projects/Reflection/src/main/config/compile-swf-config.xml
index d417ba6..b8dfa0a 100644
--- a/frameworks/projects/Reflection/src/main/config/compile-swf-config.xml
+++ b/frameworks/projects/Reflection/src/main/config/compile-swf-config.xml
@@ -31,6 +31,7 @@
         <external-library-path>
             <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
             <path-element>../../../../../libs/Core.swc</path-element>
+            <path-element>../../../../../libs/Language.swc</path-element>
         </external-library-path>
         
 		<mxml>
@@ -75,11 +76,10 @@
         
         <warn-no-constructor>false</warn-no-constructor>
     </compiler>
-    
-    <!-- TODO: Why this? -->
-    <include-sources>
-        <path-element>../royale</path-element>
-    </include-sources>
+
+    <include-classes>
+        <class>ReflectionClasses</class>
+    </include-classes>
     
     <include-namespaces>
        <uri>library://ns.apache.org/royale/basic</uri>
diff --git a/frameworks/projects/Reflection/src/main/royale/ReflectionClasses.as b/frameworks/projects/Reflection/src/main/royale/ReflectionClasses.as
new file mode 100644
index 0000000..3a7df74
--- /dev/null
+++ b/frameworks/projects/Reflection/src/main/royale/ReflectionClasses.as
@@ -0,0 +1,66 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+
+/**
+ *  @private
+ *  This class is used to link additional classes into Reflection.swc
+ *  beyond those that are found by dependecy analysis starting
+ *  from the classes specified in manifest.xml.
+ */
+internal class ReflectionClasses
+{
+	COMPILE::JS
+	{
+		import org.apache.royale.reflection.nativejs.AS3Array; AS3Array;
+		import org.apache.royale.reflection.nativejs.AS3Boolean; AS3Boolean;
+		import org.apache.royale.reflection.nativejs.AS3Number; AS3Number;
+		import org.apache.royale.reflection.nativejs.AS3int; AS3int;
+		import org.apache.royale.reflection.nativejs.AS3uint; AS3uint;
+	}
+	
+	import org.apache.royale.reflection.describeType; describeType;
+	import org.apache.royale.reflection.getAliasByClass; getAliasByClass;
+	import org.apache.royale.reflection.getClassByAlias; getClassByAlias;
+	import org.apache.royale.reflection.getDefinitionByName; getDefinitionByName;
+	import org.apache.royale.reflection.getDynamicFields; getDynamicFields;
+	import org.apache.royale.reflection.isDynamicObject; isDynamicObject;
+	import org.apache.royale.reflection.getQualifiedClassName; getQualifiedClassName;
+	import org.apache.royale.reflection.getQualifiedSuperclassName; getQualifiedSuperclassName;
+	import org.apache.royale.reflection.registerClassAlias; registerClassAlias;
+	
+	import org.apache.royale.reflection.ExtraData; ExtraData;
+	import org.apache.royale.reflection.AccessorDefinition; AccessorDefinition;
+	import org.apache.royale.reflection.CompilationData; CompilationData;
+	import org.apache.royale.reflection.DefinitionBase; DefinitionBase;
+	import org.apache.royale.reflection.DefinitionWithMetaData; DefinitionWithMetaData;
+	import org.apache.royale.reflection.FunctionDefinition; FunctionDefinition;
+	import org.apache.royale.reflection.MemberDefinitionBase; MemberDefinitionBase;
+	import org.apache.royale.reflection.MetaDataArgDefinition; MetaDataArgDefinition;
+	import org.apache.royale.reflection.MethodDefinition; MethodDefinition;
+	import org.apache.royale.reflection.ParameterDefinition; ParameterDefinition;
+	import org.apache.royale.reflection.TypeDefinition; TypeDefinition;
+	import org.apache.royale.reflection.VariableDefinition; VariableDefinition;
+	
+
+}
+
+}
+
diff --git a/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/DefinitionWithMetaData.as b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/DefinitionWithMetaData.as
index 3b1bd56..003a9b1 100755
--- a/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/DefinitionWithMetaData.as
+++ b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/DefinitionWithMetaData.as
@@ -67,7 +67,9 @@ package org.apache.royale.reflection
                 {
                     var name:String = data.names[0].qName;
                     var def:Object = getDefinitionByName(name);
-                    rdata = def.prototype.ROYALE_REFLECTION_INFO();
+                    if (def.prototype.ROYALE_REFLECTION_INFO)
+                        rdata = def.prototype.ROYALE_REFLECTION_INFO();
+                    else rdata = data;
                 }
                 else
                     rdata = data;
diff --git a/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/ExtraData.as b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/ExtraData.as
new file mode 100644
index 0000000..ad516fd
--- /dev/null
+++ b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/ExtraData.as
@@ -0,0 +1,155 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.reflection {
+	
+	COMPILE::JS{
+		import org.apache.royale.reflection.nativejs.*
+	}
+	
+
+	/**
+	 *  Information about extra reflection definitions
+     *  not required in SWF
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion Royale 0.0
+	 */
+	COMPILE::SWF
+	public class ExtraData {
+		
+		public static function get isRelevant():Boolean{
+			return false;
+		}
+		
+		public static function hasData(key:*):Boolean{
+			return false
+		}
+		
+		public static function getData(key:*):Object{
+			return null;
+		}
+		
+		public static function addExternDefintion(item:Object):void{
+		
+		}
+		
+		public static function addAll():void{
+		
+		}
+	}
+    
+    
+    /**
+     *  Information about extra reflection definitions
+     *  required in JS to optionally support extra reflection
+     *  data. This class itself is non-reflectable, and does not create
+	 *  dependencies from the org.apache.royale.reflection.nativejs package
+	 *  in js release output, unless they are added.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion Royale 0.0
+     *  
+	 *  @royalesuppressexport
+     */
+	COMPILE::JS
+	public class ExtraData {
+		
+		private static var reflectionData:Map;
+		
+		/**
+		 * this is non-reflectable
+		 * @royalesuppressexport
+		 */
+		public static function get isRelevant():Boolean{
+			return true;
+		}
+		
+		/**
+		 * this is non-reflectable
+		 * @royalesuppressexport
+		 */
+		public static function hasData(key:*):Boolean{
+			return reflectionData && reflectionData.has(key);
+		}
+		
+		/**
+		 * this is non-reflectable
+		 * @royalesuppressexport
+		 */
+		public static function getData(key:*):Object{
+			return reflectionData.get(key);
+		}
+		
+		/**
+		 * this method itself is non-reflectable
+		 * If an application requires reflection of specific Native types and Royale synthetic types in javascript
+		 * call this method for each specific representation inside the nativejs package
+		 * at startup, before reflection is used in any code
+		 *
+		 * Use this to add selective definitions only (PAYG)
+		 * If this method is never used, it
+		 * will not be included in release build
+		 *
+		 * example:
+		 * import org.apache.royale.reflection.nativejs.AS3Array
+		 * ExtraData.addExternalDefinition(AS3Array())
+		 *
+		 * @royalesuppressexport
+
+		 */
+		public static function addExternDefintion(item:Object):void{
+			if (!reflectionData) reflectionData = new Map();
+			reflectionData.set(item['name'], item);
+			reflectionData.set(item['classRef'], item);
+		}
+		
+		/**
+		 * this method itself is non-reflectable
+		 * If an application requires reflection of default Native types and Royale synthetic types in javascript
+		 * call this method near application startup, before reflection is used in any code
+		 *
+ 		 * Use this to add corresponding reflection support for native js definitions
+		 * that are used to correspond to common native as3 types (non-PAYG)
+		 * If this method is never used, the dependencies inside it
+		 * will not be included in release build
+		 *
+		 * @royalesuppressexport
+
+		 */
+		public static function addAll():void{
+			var items:Array = [
+				AS3Array(),
+				AS3Number(),
+				AS3String(),
+				AS3Boolean(),
+				AS3int(),
+				AS3uint(),
+				AS3Vector()
+			];
+			while(items.length) addExternDefintion(items.pop());
+			
+		}
+		
+	}
+	
+}
diff --git a/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/TypeDefinition.as b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/TypeDefinition.as
index 44bab7c..51c15ad 100755
--- a/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/TypeDefinition.as
+++ b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/TypeDefinition.as
@@ -114,7 +114,11 @@ COMPILE::SWF {
         }
         
         internal static function internalGetDefinition(name:String, rawData:Object = null):TypeDefinition{
-			return _cache ? (_cache[name] || new TypeDefinition(name, rawData)) : new TypeDefinition(name, rawData);
+            COMPILE::SWF {
+                //normalize Vector naming
+                if (name.indexOf('__AS3__.vec::') == 0) name = name.substr(13);
+            }
+            return _cache ? (_cache[name] || new TypeDefinition(name, rawData)) : new TypeDefinition(name, rawData);
         }
 
         /**
@@ -125,6 +129,10 @@ COMPILE::SWF {
          */
         public function TypeDefinition(name:String, rawData:Object = null)
         {
+            COMPILE::SWF {
+                //normalize Vector naming
+                if (name.indexOf('__AS3__.vec::') == 0) name = name.substr(13);
+            }
             if (_cache) _cache[name] = this;
 
 			var c:int;
@@ -139,10 +147,11 @@ COMPILE::SWF {
 					_packageName = "";
                 //this definition sets a flag for where to find the metadata:
                 useFactory = true;
+                
 			}
 			COMPILE::JS{
 				c = name.lastIndexOf(".");
-				if (c > -1)
+				if (c > -1 && name.indexOf('Vector.') != 0)
 				{
 					_packageName = name.substr(0, c);
 					name = name.substr(c+1);
@@ -150,7 +159,7 @@ COMPILE::SWF {
 				else
 					_packageName = "";
 			}
-            _specialCase = _packageName=="" && SC.indexOf(name) != -1;
+            _specialCase = _packageName == "" && SC.indexOf(name) != -1;
             super(name, rawData);
         }
 
@@ -242,6 +251,9 @@ COMPILE::SWF {
                         def = getDefinitionByName(_packageName + "." + _name);
                     else def = getDefinitionByName(_name);
                     _rawData = def.prototype.ROYALE_CLASS_INFO;
+                    if (_rawData == null) {
+                        _rawData = ExtraData.hasData(def) ? ExtraData.getData(def)['ROYALE_CLASS_INFO'] : null;
+                    }
                 }
             }
             return _rawData;
@@ -260,13 +272,15 @@ COMPILE::SWF {
                 if (!_constructorMethod) {
                     var source:XML = rawData.factory.constructor[0];//['constructor'][0];
                     var declaredBy:String = _packageName.length? _packageName+"::"+_name : _name;
+                    var xmlName:String = _name.replace('<', '&lt;');
+                    declaredBy = declaredBy.replace('<', '&lt;');
                     if (source ==null) {
                         //constructor with no params
                         _constructorMethod =
-                                new MethodDefinition(_name, false, this, XML('<method name="'+_name+'" declaredBy="'+declaredBy+'" returnType="" />'));
+                                new MethodDefinition(_name, false, this, XML('<method name="'+xmlName+'" declaredBy="'+declaredBy+'" returnType="" />'));
                     } else {
                         var params:XMLList = source.parameter;
-                        _constructorMethod=new MethodDefinition(_name, false, this, XML('<method name="'+_name+'" declaredBy="'+declaredBy+'" returnType="">'+params.toXMLString()+'</method>'))
+                        _constructorMethod=new MethodDefinition(_name, false, this, XML('<method name="'+xmlName+'" declaredBy="'+declaredBy+'" returnType="">'+params.toXMLString()+'</method>'))
                     }
                 }
             }
@@ -704,8 +718,9 @@ COMPILE::SWF {
            var data:Object = rawData;
            var qname:String = data.names[0].qName;
            var def:Object = getDefinitionByName(qname);
-           var rdata:* =  def.prototype.ROYALE_REFLECTION_INFO();
-
+            
+           const infoDataSource:Function =  def.prototype.ROYALE_REFLECTION_INFO || ExtraData.getData(qname)['ROYALE_REFLECTION_INFO'];
+           var rdata:* =  infoDataSource();
            var itemClass:Class = lookups[collection];
 
            var l:int, i:int = 0;
@@ -726,7 +741,7 @@ COMPILE::SWF {
            //get the local definitions
             if (rdata !== undefined)
             {
-                var items:Object = rdata[collection]();
+                var items:Object = rdata[collection] ? rdata[collection]() : null;
                 if (items)
                 {
                     for (var item:String in items)
diff --git a/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/beads/ClassAliasBead.as b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/beads/ClassAliasBead.as
index c7d55a9..81fb0d0 100644
--- a/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/beads/ClassAliasBead.as
+++ b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/beads/ClassAliasBead.as
@@ -83,7 +83,7 @@ package org.apache.royale.reflection.beads
                 {
                     var alias:String = map[cn];
                     var c:Class = getDefinitionByName(cn) as Class;
-                    if (c) // if no class, may have only been used in JS as a type and never actually instnatiated
+                    if (c) // if no class, may have only been used in JS as a type and never actually instantiated
                         registerClassAlias(alias, c);
                 }
             }
diff --git a/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/describeType.as b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/describeType.as
index ce6406a..13d8cd7 100755
--- a/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/describeType.as
+++ b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/describeType.as
@@ -21,7 +21,12 @@ package org.apache.royale.reflection
 COMPILE::SWF
 {
     import flash.utils.describeType;
+    import flash.external.ExternalInterface;
 }
+COMPILE::JS
+{
+    import org.apache.royale.utils.Language;
+}   
 
     /**
      *  The equivalent of flash.utils.describeType.
@@ -35,10 +40,11 @@ COMPILE::SWF
 	{
         COMPILE::SWF
         {
-
             var untyped:* = value;
             if (value !== null && untyped !== undefined) {
                 //normalize the query object to the static Class or interface level
+                //numeric values have some specific range quirks:
+                if (value is int && value >= -268435456 && value <= 268435455) value = int;
                 while (value['constructor'] !== Class) {
                     value = value['constructor'];
                 }
@@ -48,8 +54,21 @@ COMPILE::SWF
         }
         COMPILE::JS
         {
-            var qname:String = getQualifiedClassName(value);
-            return TypeDefinition.getDefinition(qname, value.ROYALE_CLASS_INFO || (value.prototype ? value.prototype.ROYALE_CLASS_INFO : null));
+            const qname:String = getQualifiedClassName(value);
+            var data:Object = value.ROYALE_CLASS_INFO || (value.prototype ? value.prototype.ROYALE_CLASS_INFO : null);
+            if (!data) {
+                if (ExtraData.hasData(qname)) {
+                    data = ExtraData.getData(qname)['ROYALE_CLASS_INFO'];
+                } else {
+                    var key:* = (value.constructor && value.constructor != Function && !Language.isSynthType(value)) ? value.constructor : value;
+                    data = ExtraData.hasData(key) ? ExtraData.getData(key)['ROYALE_CLASS_INFO'] : null; 
+                    if (!data) {
+                        key = getDefinitionByName(qname);
+                        data = ExtraData.hasData(key) ? ExtraData.getData(key)['ROYALE_CLASS_INFO'] : null;
+                    }
+                }
+            }
+            return TypeDefinition.getDefinition(qname, data);
         }
     }
 }
diff --git a/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/getDefinitionByName.as b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/getDefinitionByName.as
index d90beef..6de2fd6 100755
--- a/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/getDefinitionByName.as
+++ b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/getDefinitionByName.as
@@ -39,17 +39,43 @@ COMPILE::JS
 	{
         COMPILE::SWF
         {
+            //convenience 'top level' re-mapping for Vector names:
+            if (name.indexOf("Vector.<") == 0)
+            {
+                name = '__AS3__.vec.' + name;
+            }
+            if (name == '__AS3__.vec.Vector.<*>') {
+                //this does not work via native getDefinitionByName
+                return Vector.<*>;
+            }
             return flash.utils.getDefinitionByName(name);
         }
         COMPILE::JS
         {
             var parts:Array = name.split('.');
-            var n:int = parts.length;
-            //use goog.global instead of window to support node too
-            var o:Object = goog.global;
-            for (var i:int = 0; i < n; i++) {
-                o = o[parts[i]];
+            var o:Object;
+            if (parts[0] != 'Vector') {
+                var n:int = parts.length;
+                //use goog.global instead of window to support node too
+                o = goog.global;
+                for (var i:int = 0; i < n; i++) {
+                    o = o[parts[i]];
+                }
+            } else {
+                if (parts[1] != '<*>') {
+                    if (!ExtraData.hasData(name)) {
+                        //not already populated
+                        if (ExtraData.hasData('Vector.<*>')) {
+                            const newVectorData:Object = ExtraData.getData('Vector.<*>')['variant'](name);
+                            ExtraData.addExternDefintion(newVectorData);
+                            o = newVectorData['classRef']
+                        } //otherwise not possible
+                    } else {
+                        o = ExtraData.getData(name)['classRef'];
+                    }
+                }
             }
+            if (o == null && ExtraData.hasData(name)) o = ExtraData.getData(name)['classRef'];
             return o;
         }
     }
diff --git a/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/getQualifiedClassName.as b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/getQualifiedClassName.as
index 599d59e..cefb825 100755
--- a/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/getQualifiedClassName.as
+++ b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/getQualifiedClassName.as
@@ -22,6 +22,9 @@ COMPILE::SWF
 {
     import flash.utils.getQualifiedClassName;
 }
+COMPILE::JS{
+    import org.apache.royale.utils.Language
+}
     
     /**
      *  The equivalent of flash.utils.getQualifiedClassName.
@@ -35,25 +38,60 @@ COMPILE::SWF
 	{
         COMPILE::SWF
         {
-            return flash.utils.getQualifiedClassName(value);
+            //normalize for Vector:
+            return flash.utils.getQualifiedClassName(value).replace('__AS3__.vec::','');
         }
         COMPILE::JS
         {
             var defName:String = typeof(value);
             if (defName === "string") return "String";
-            if (defName === "number") return "Number";
+            if (defName === "number") {
+                if (value === value>>0 && ExtraData.hasData('int') && (value >= -268435456 && value <= 268435455)) return 'int';
+                return "Number";
+            }
             if (defName === "boolean") return "Boolean";
             if (defName === "undefined") return null;
             if (value === null) return null;
-            if (Array.isArray(value)) return "Array";
+            if (Array.isArray(value)) {
+                //exclude Vector emulation:
+                if (Language.SYNTH_TAG_FIELD in value) return value[Language.SYNTH_TAG_FIELD]['type'];
+                return "Array";
+            }
+            var classInfo:Object = value.ROYALE_CLASS_INFO;
             
-            if (value.ROYALE_CLASS_INFO == null)
+            if (!classInfo)
             {
-                if (value.prototype == null || value.prototype.ROYALE_CLASS_INFO == null)
+                if (!value.prototype) {
+                    //instance
+                    if (ExtraData.hasData(value.constructor)) {
+                        //value is instance of a 'native class'
+                        classInfo =  ExtraData.getData(value.constructor)['ROYALE_CLASS_INFO'];
+                    } else {
+                        if (Language.isSynthType(value.constructor)) {
+                            return value.constructor['type'];
+                        }
+                    }
+                } else {
+                    //class
+                    classInfo = value.prototype.ROYALE_CLASS_INFO;
+                    if (!classInfo) {
+                        if (ExtraData.hasData(value)) {
+                            //value is a native 'class'
+                            classInfo =  ExtraData.getData(value)['ROYALE_CLASS_INFO'];
+                        }
+                    }
+                    if (!classInfo) {
+                        if (Language.isSynthType(value)) {
+                            return value['type'];
+                        }
+                    }
+                }
+                if (!classInfo) {
+                    //fallback
                     return "Object";
-                value = value.prototype;
+                }
             }
-            return value.ROYALE_CLASS_INFO.names[0].qName;
+            return classInfo.names[0].qName;
         }
     }
 }
diff --git a/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/getDefinitionByName.as b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/nativejs/AS3Array.as
old mode 100755
new mode 100644
similarity index 51%
copy from frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/getDefinitionByName.as
copy to frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/nativejs/AS3Array.as
index d90beef..7990e2a
--- a/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/getDefinitionByName.as
+++ b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/nativejs/AS3Array.as
@@ -16,41 +16,36 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
-package org.apache.royale.reflection
-{
-COMPILE::SWF
-{
-    import flash.utils.getDefinitionByName;
-}
-COMPILE::JS
-{
-    import goog.global;
-}
+package org.apache.royale.reflection.nativejs {
     
     /**
-     *  The equivalent of flash.utils.getDefinitionByName.
-     * 
-     *  @langversion 3.0
-     *  @playerversion Flash 10.2
-     *  @playerversion AIR 2.6
-     *  @productversion Royale 0.0
+     * Provides data for a stand-in TypeDefinition of the native as3 type for javascript
      */
-    public function getDefinitionByName(name:String):Object
-	{
-        COMPILE::SWF
-        {
-            return flash.utils.getDefinitionByName(name);
-        }
-        COMPILE::JS
-        {
-            var parts:Array = name.split('.');
-            var n:int = parts.length;
-            //use goog.global instead of window to support node too
-            var o:Object = goog.global;
-            for (var i:int = 0; i < n; i++) {
-                o = o[parts[i]];
-            }
-            return o;
-        }
+    COMPILE::JS
+    public function AS3Array():Object{
+        var ret:Object= {};
+        ret['classRef'] = Array;
+        ret['name'] = 'Array';
+        ret['NATIVE_TYPE'] = true;
+    
+        ret['ROYALE_CLASS_INFO'] = { names: [{ name: 'Array', qName: 'Array', kind: 'class' }] };
+    
+        ret['ROYALE_REFLECTION_INFO'] = function():Object {
+            return {
+                'accessors':function():Object {
+                    return {
+                        'length':{'access':'readwrite','type':'uint','declaredBy':'Array'}
+                    };
+                },
+                'methods':function():Object {
+                    return {
+                        'Array':{'declaredBy':'Array','type':''}
+                    };
+                }
+            };
+        };
+        
+        return ret;
     }
+    
 }
diff --git a/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/getDefinitionByName.as b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/nativejs/AS3Boolean.as
old mode 100755
new mode 100644
similarity index 54%
copy from frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/getDefinitionByName.as
copy to frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/nativejs/AS3Boolean.as
index d90beef..75b09b7
--- a/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/getDefinitionByName.as
+++ b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/nativejs/AS3Boolean.as
@@ -16,41 +16,33 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
-package org.apache.royale.reflection
-{
-COMPILE::SWF
-{
-    import flash.utils.getDefinitionByName;
-}
-COMPILE::JS
-{
-    import goog.global;
-}
+package org.apache.royale.reflection.nativejs {
+    
     
     /**
-     *  The equivalent of flash.utils.getDefinitionByName.
-     * 
-     *  @langversion 3.0
-     *  @playerversion Flash 10.2
-     *  @playerversion AIR 2.6
-     *  @productversion Royale 0.0
+     * Provides data for a stand-in TypeDefinition of the native as3 type for javascript
      */
-    public function getDefinitionByName(name:String):Object
-	{
-        COMPILE::SWF
-        {
-            return flash.utils.getDefinitionByName(name);
-        }
-        COMPILE::JS
-        {
-            var parts:Array = name.split('.');
-            var n:int = parts.length;
-            //use goog.global instead of window to support node too
-            var o:Object = goog.global;
-            for (var i:int = 0; i < n; i++) {
-                o = o[parts[i]];
-            }
-            return o;
-        }
+    COMPILE::JS
+    public function AS3Boolean():Object{
+        var ret:Object= {};
+        ret['classRef'] = Boolean;
+        ret['name'] = 'Boolean';
+        ret['NATIVE_TYPE'] = true;
+        
+        ret['ROYALE_CLASS_INFO'] = { names: [{ name: 'Boolean', qName: 'Boolean', kind: 'class' }] };
+    
+        ret['ROYALE_REFLECTION_INFO'] = function():Object {
+            return {
+                'methods':function():Object {
+                    return {
+                        'Boolean':{'parameters':function():Object { return [{'index':1,'optional':true,'type':'*'}]},'type':'','declaredBy':'Boolean'}
+                    };
+                }
+            };
+        };
+    
+        return ret;
+    
     }
+    
 }
diff --git a/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/nativejs/AS3Number.as b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/nativejs/AS3Number.as
new file mode 100644
index 0000000..6e2abc7
--- /dev/null
+++ b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/nativejs/AS3Number.as
@@ -0,0 +1,65 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.reflection.nativejs {
+    
+    /**
+     * Provides data for a stand-in TypeDefinition of the native as3 type for javascript
+     */
+    COMPILE::JS
+    public function AS3Number():Object{
+        var ret:Object= {};
+        ret['classRef'] = Number;
+        ret['name'] = 'Number';
+        ret['NATIVE_TYPE'] = true;
+        
+        ret['ROYALE_CLASS_INFO'] = { names: [{ name: 'Number', qName: 'Number', kind: 'class' }] };
+    
+        ret['ROYALE_REFLECTION_INFO'] = function():Object {
+            return {
+                'methods':function():Object {
+                    return {
+                        'Number':{'parameters':function():Object { return [{'index':1,'optional':true,'type':'*'}]},'type':'','declaredBy':'Number'},
+                        '|sin':{'parameters':function():Object {return [{'index':1,'optional':false,'type':'Number'}]},'declaredBy':'Number','type':'Number'},
+                        '|random':{'declaredBy':'Number','type':'Number'},
+                        '|atan2':{'parameters':function():Object {return [{'index':1,'optional':false,'type':'Number'},{'index':2,'optional':false,'type':'Number'}]},'declaredBy':'Number','type':'Number'},
+                        '|sqrt':{'parameters':function():Object {return [{'index':1,'optional':false,'type':'Number'}]},'declaredBy':'Number','type':'Number'},
+                        '|cos':{'parameters':function():Object {return [{'index':1,'optional':false,'type':'Number'}]},'declaredBy':'Number','type':'Number'},
+                        '|asin':{'parameters':function():Object {return [{'index':1,'optional':false,'type':'Number'}]},'declaredBy':'Number','type':'Number'},
+                        '|tan':{'parameters':function():Object {return [{'index':1,'optional':false,'type':'Number'}]},'declaredBy':'Number','type':'Number'},
+                        '|floor':{'parameters':function():Object {return [{'index':1,'optional':false,'type':'Number'}]},'declaredBy':'Number','type':'Number'},
+                        '|max':{'parameters':function():Object {return [{'index':1,'optional':true,'type':'Number'},{'index':2,'optional':true,'type':'Number'}]},'declaredBy':'Number','type':'Number'},
+                        '|abs':{'parameters':function():Object {return [{'index':1,'optional':false,'type':'Number'}]},'declaredBy':'Number','type':'Number'},
+                        '|exp':{'parameters':function():Object {return [{'index':1,'optional':false,'type':'Number'}]},'declaredBy':'Number','type':'Number'},
+                        '|atan':{'parameters':function():Object {return [{'index':1,'optional':false,'type':'Number'}]},'declaredBy':'Number','type':'Number'},
+                        '|round':{'parameters':function():Object {return [{'index':1,'optional':false,'type':'Number'}]},'declaredBy':'Number','type':'Number'},
+                        '|log':{'parameters':function():Object {return [{'index':1,'optional':false,'type':'Number'}]},'declaredBy':'Number','type':'Number'},
+                        '|min':{'parameters':function():Object {return [{'index':1,'optional':true,'type':'Number'},{'index':2,'optional':true,'type':'Number'}]},'declaredBy':'Number','type':'Number'},
+                        '|acos':{'parameters':function():Object {return [{'index':1,'optional':false,'type':'Number'}]},'declaredBy':'Number','type':'Number'},
+                        '|ceil':{'parameters':function():Object {return [{'index':1,'optional':false,'type':'Number'}]},'declaredBy':'Number','type':'Number'},
+                        '|pow':{'parameters':function():Object {return [{'index':1,'optional':false,'type':'Number'},{'index':2,'optional':false,'type':'Number'}]},'declaredBy':'Number','type':'Number'}
+                    };
+                }
+            };
+        };
+    
+        return ret;
+    
+    }
+    
+}
diff --git a/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/nativejs/AS3String.as b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/nativejs/AS3String.as
new file mode 100644
index 0000000..18fc766
--- /dev/null
+++ b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/nativejs/AS3String.as
@@ -0,0 +1,52 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.reflection.nativejs {
+    
+    /**
+     * Provides data for a stand-in TypeDefinition of the native as3 type for javascript
+     */
+    COMPILE::JS
+    public function AS3String():Object{
+        var ret:Object= {};
+        ret['classRef'] = String;
+        ret['name'] = 'String';
+        ret['NATIVE_TYPE'] = true;
+        
+        ret['ROYALE_CLASS_INFO'] = { names: [{ name: 'String', qName: 'String', kind: 'class' }] };
+    
+        ret['ROYALE_REFLECTION_INFO'] = function():Object {
+            return {
+                'accessors':function():Object {
+                    return {
+                        'length':{'access':'readonly','type':'int','declaredBy':'String'}
+                    };
+                },
+                'methods':function():Object {
+                    return {
+                        'String':{'parameters':function():Object { return [{'index':1,'optional':true,'type':'*'}]},'type':'','declaredBy':'String'}
+                    };
+                }
+            };
+        };
+        
+        return ret;
+    
+    }
+    
+}
diff --git a/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/nativejs/AS3Vector.as b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/nativejs/AS3Vector.as
new file mode 100644
index 0000000..1717df7
--- /dev/null
+++ b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/nativejs/AS3Vector.as
@@ -0,0 +1,63 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.reflection.nativejs {
+    
+    COMPILE::JS{
+        import org.apache.royale.utils.Language
+    }
+    
+    /**
+     * Provides data for a stand-in TypeDefinition of the native as3 type for javascript
+     */
+    COMPILE::JS
+    public function AS3Vector(typeName:String='Vector.<*>'):Object{
+        var ret:Object= {};
+        ret['classRef'] = Language.synthVector(typeName.substring(8, typeName.length - 1));
+        ret['name'] = typeName;
+        ret['SYNTHETIC_TYPE'] = true;
+        
+        ret['ROYALE_CLASS_INFO'] = { names: [{ name: typeName, qName: typeName, kind: 'class' }] };
+    
+        ret['ROYALE_REFLECTION_INFO'] = function():Object {
+            return {
+                'accessors':function():Object {
+                    return {
+                        'length':{'access':'readwrite','type':'uint','declaredBy': typeName},
+                        'fixed':{'access':'readwrite','type':'Boolean','declaredBy': typeName}
+                    };
+                },
+                'methods':function():Object {
+                    var ret:Object = {};
+                    //constructor
+                    ret[typeName] ={'parameters':function():Object {return [{'index':1,'optional':true,'type':'uint'},{'index':2,'optional':true,'type':'Boolean'}]},'type':'','declaredBy': typeName};
+                    return ret;
+                }
+            };
+        };
+        if (typeName == 'Vector.<*>') {
+            //support for Vector variant subtypes
+            ret['variant'] = function(subType:String):Object {
+                return AS3Vector(subType);
+            };
+        }
+        
+        return ret;
+    }
+    
+}
diff --git a/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/getDefinitionByName.as b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/nativejs/AS3int.as
old mode 100755
new mode 100644
similarity index 52%
copy from frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/getDefinitionByName.as
copy to frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/nativejs/AS3int.as
index d90beef..be54308
--- a/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/getDefinitionByName.as
+++ b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/nativejs/AS3int.as
@@ -16,41 +16,36 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
-package org.apache.royale.reflection
-{
-COMPILE::SWF
-{
-    import flash.utils.getDefinitionByName;
-}
-COMPILE::JS
-{
-    import goog.global;
-}
+package org.apache.royale.reflection.nativejs {
+    
+    COMPILE::JS{
+        import org.apache.royale.utils.Language
+    }
     
     /**
-     *  The equivalent of flash.utils.getDefinitionByName.
-     * 
-     *  @langversion 3.0
-     *  @playerversion Flash 10.2
-     *  @playerversion AIR 2.6
-     *  @productversion Royale 0.0
+     * Provides data for a stand-in TypeDefinition of the native as3 type for javascript
      */
-    public function getDefinitionByName(name:String):Object
-	{
-        COMPILE::SWF
-        {
-            return flash.utils.getDefinitionByName(name);
-        }
-        COMPILE::JS
-        {
-            var parts:Array = name.split('.');
-            var n:int = parts.length;
-            //use goog.global instead of window to support node too
-            var o:Object = goog.global;
-            for (var i:int = 0; i < n; i++) {
-                o = o[parts[i]];
-            }
-            return o;
-        }
+    COMPILE::JS
+    public function AS3int():Object{
+        var ret:Object= {};
+        ret['classRef'] = int;
+        ret['name'] = 'int';
+        ret['SYNTHETIC_TYPE'] = true;
+        
+        ret['ROYALE_CLASS_INFO'] = { names: [{ name: 'int', qName: 'int', kind: 'class' }] };
+    
+        ret['ROYALE_REFLECTION_INFO'] = function():Object {
+            return {
+                'methods':function():Object {
+                    return {
+                        'int':{'parameters':function():Object {return [{'index':1,'optional':true,'type':'*'}]},'type':'','declaredBy':'int'}
+                    };
+                }
+            };
+        };
+    
+        return ret;
+    
     }
+    
 }
diff --git a/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/getDefinitionByName.as b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/nativejs/AS3uint.as
old mode 100755
new mode 100644
similarity index 52%
copy from frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/getDefinitionByName.as
copy to frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/nativejs/AS3uint.as
index d90beef..b0ee990
--- a/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/getDefinitionByName.as
+++ b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/nativejs/AS3uint.as
@@ -16,41 +16,35 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
-package org.apache.royale.reflection
-{
-COMPILE::SWF
-{
-    import flash.utils.getDefinitionByName;
-}
-COMPILE::JS
-{
-    import goog.global;
-}
+package org.apache.royale.reflection.nativejs {
+    
+    COMPILE::JS{
+        import org.apache.royale.utils.Language
+    }
     
     /**
-     *  The equivalent of flash.utils.getDefinitionByName.
-     * 
-     *  @langversion 3.0
-     *  @playerversion Flash 10.2
-     *  @playerversion AIR 2.6
-     *  @productversion Royale 0.0
+     * Provides data for a stand-in TypeDefinition of the native as3 type for javascript
      */
-    public function getDefinitionByName(name:String):Object
-	{
-        COMPILE::SWF
-        {
-            return flash.utils.getDefinitionByName(name);
-        }
-        COMPILE::JS
-        {
-            var parts:Array = name.split('.');
-            var n:int = parts.length;
-            //use goog.global instead of window to support node too
-            var o:Object = goog.global;
-            for (var i:int = 0; i < n; i++) {
-                o = o[parts[i]];
-            }
-            return o;
-        }
+    COMPILE::JS
+    public function AS3uint():Object{
+        var ret:Object= {};
+        ret['classRef'] = uint;
+        ret['name'] = 'uint';
+        ret['SYNTHETIC_TYPE'] = true;
+        
+        ret['ROYALE_CLASS_INFO'] = { names: [{ name: 'uint', qName: 'uint', kind: 'class' }] };
+    
+        ret['ROYALE_REFLECTION_INFO'] = function():Object {
+            return {
+                'methods':function():Object {
+                    return {
+                        'uint':{'parameters':function():Object { return [{'index':1,'optional':true,'type':'*'}]},'type':'','declaredBy':'uint'}
+                    };
+                }
+            };
+        };
+    
+        return ret;
     }
+    
 }
diff --git a/frameworks/projects/RoyaleSite/pom.xml b/frameworks/projects/RoyaleSite/pom.xml
index f0b5394..2f9ccc0 100644
--- a/frameworks/projects/RoyaleSite/pom.xml
+++ b/frameworks/projects/RoyaleSite/pom.xml
@@ -55,7 +55,7 @@
           </includeFiles>
           <skipExtern>true</skipExtern>
           <skipAS>${royale.skipAS}</skipAS>
-          <additionalCompilerOptions>-js-default-initializers=false;-source-map=true</additionalCompilerOptions>
+          <additionalCompilerOptions>-js-default-initializers=false;-js-complex-implicit-coercions=false;-js-vector-index-checks=false;-js-resolve-uncertain=false;-source-map=true</additionalCompilerOptions>
         </configuration>
       </plugin>
     </plugins>
diff --git a/frameworks/projects/RoyaleUnit/pom.xml b/frameworks/projects/RoyaleUnit/pom.xml
index d0cb06e..484474a 100644
--- a/frameworks/projects/RoyaleUnit/pom.xml
+++ b/frameworks/projects/RoyaleUnit/pom.xml
@@ -44,7 +44,7 @@
           <includeSources>true</includeSources>
           <skipExtern>true</skipExtern>
           <skipAS>${royale.skipAS}</skipAS>
-          <additionalCompilerOptions>-js-default-initializers=false;-source-map=true</additionalCompilerOptions>
+          <additionalCompilerOptions>-js-default-initializers=false;-js-complex-implicit-coercions=false;-js-vector-index-checks=false;-js-resolve-uncertain=false;-source-map=true</additionalCompilerOptions>
         </configuration>
       </plugin>
     </plugins>
@@ -65,6 +65,34 @@
       <type>swc</type>
       <classifier>js</classifier>
     </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Basic</artifactId>
+      <version>0.9.6-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>swf</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Basic</artifactId>
+      <version>0.9.6-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>js</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Reflection</artifactId>
+      <version>0.9.6-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>swf</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Reflection</artifactId>
+      <version>0.9.6-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>js</classifier>
+    </dependency>
   </dependencies>
 
 </project>
diff --git a/frameworks/projects/SparkRoyale/pom.xml b/frameworks/projects/SparkRoyale/pom.xml
index b8dcc72..0a49370 100644
--- a/frameworks/projects/SparkRoyale/pom.xml
+++ b/frameworks/projects/SparkRoyale/pom.xml
@@ -65,7 +65,7 @@
               </define>
           </defines>
           <allowSubclassOverrides>true</allowSubclassOverrides>
-          <additionalCompilerOptions>-js-default-initializers=false;-js-compiler-define=COMPILE::JS,true;-js-compiler-define=COMPILE::SWF,false;-js-compiler-define=GOOG::DEBUG,goog.DEBUG</additionalCompilerOptions>
+          <additionalCompilerOptions>-js-default-initializers=false;-js-complex-implicit-coercions=false;-js-vector-index-checks=false;-js-resolve-uncertain=false;-js-compiler-define=COMPILE::JS,true;-js-compiler-define=COMPILE::SWF,false;-js-compiler-define=GOOG::DEBUG,goog.DEBUG</additionalCompilerOptions>
         </configuration>
       </plugin>
     </plugins>
diff --git a/frameworks/projects/Storage/pom.xml b/frameworks/projects/Storage/pom.xml
index 3d4bd0d..623f57a 100644
--- a/frameworks/projects/Storage/pom.xml
+++ b/frameworks/projects/Storage/pom.xml
@@ -58,7 +58,7 @@
           </includeFiles>
           <skipExtern>true</skipExtern>
           <skipAS>${royale.skipAS}</skipAS>
-          <additionalCompilerOptions>-js-default-initializers=false;-source-map=true</additionalCompilerOptions>
+          <additionalCompilerOptions>-js-default-initializers=false;-js-complex-implicit-coercions=false;-js-vector-index-checks=false;-js-resolve-uncertain=false;-source-map=true</additionalCompilerOptions>
         </configuration>
       </plugin>
     </plugins>
diff --git a/frameworks/projects/TLF/pom.xml b/frameworks/projects/TLF/pom.xml
index 5adc916..5ed168d 100644
--- a/frameworks/projects/TLF/pom.xml
+++ b/frameworks/projects/TLF/pom.xml
@@ -64,7 +64,14 @@
           <allowSubclassOverrides>true</allowSubclassOverrides>
           <skipAS>${royale.skipAS}</skipAS>
           <skipExtern>true</skipExtern>
-          <additionalCompilerOptions>-js-default-initializers=false;-source-map=true</additionalCompilerOptions>
+          <additionalCompilerOptions>
+            -js-default-initializers=false;
+            -js-complex-implicit-coercions=false;
+            -js-vector-index-checks=false;
+            -js-resolve-uncertain=false;
+            -js-vector-emulation-class=Array;
+            -source-map=true;
+          </additionalCompilerOptions>
           <defines>
             <define>
               <name>CONFIG::debug</name>
diff --git a/frameworks/projects/Text/pom.xml b/frameworks/projects/Text/pom.xml
index 6f675ee..1804d99 100644
--- a/frameworks/projects/Text/pom.xml
+++ b/frameworks/projects/Text/pom.xml
@@ -64,7 +64,7 @@
           <allowSubclassOverrides>true</allowSubclassOverrides>
           <skipAS>${royale.skipAS}</skipAS>
           <skipExtern>true</skipExtern>
-          <additionalCompilerOptions>-js-default-initializers=false;-source-map=true</additionalCompilerOptions>
+          <additionalCompilerOptions>-js-default-initializers=false;-js-complex-implicit-coercions=false;-js-vector-index-checks=false;-js-resolve-uncertain=false;-source-map=true</additionalCompilerOptions>
         </configuration>
       </plugin>
     </plugins>
diff --git a/frameworks/projects/XML/src/main/royale/XML.as b/frameworks/projects/XML/src/main/royale/XML.as
index a4984cd..f0ae94f 100644
--- a/frameworks/projects/XML/src/main/royale/XML.as
+++ b/frameworks/projects/XML/src/main/royale/XML.as
@@ -19,6 +19,9 @@
 package
 {
 	COMPILE::JS
+	/**
+	 * @royaleignorepublicvarwarning
+	 */
 	public class XML
 	{
 		import org.apache.royale.debugging.assert;
@@ -80,26 +83,26 @@ package
 
 		/**
 		 * [static] Determines whether XML comments are ignored when XML objects parse the source XML data.
-		 *  
+		 *
 		 */
 		static public var ignoreComments:Boolean = true;
 		
 		/**
 		 * [static] Determines whether XML processing instructions are ignored when XML objects parse the source XML data.
-		 *  
+		 *
 		 */
 		static public var ignoreProcessingInstructions:Boolean = true;
 		
 		/**
 		 * [static] Determines whether white space characters at the beginning and end of text nodes are ignored during parsing.
-		 *  
+		 *
 		 */
 		static public var ignoreWhitespace:Boolean = true;
 		
 		static private var _prettyIndent:int = 2;
 		/**
 		 * [static] Determines the amount of indentation applied by the toString() and toXMLString() methods when the XML.prettyPrinting property is set to true.
-		 * 
+		 *
 		 */
 		static public function set prettyIndent(value:int):void
 		{
@@ -121,13 +124,12 @@ package
 		
 		/**
 		 * [static] Determines whether the toString() and toXMLString() methods normalize white space characters between some tags.
-		 * 
+		 *
 		 */
 		static public var prettyPrinting:Boolean = true;
 		
 		static private function escapeAttributeValue(value:String):String
 		{
-			var outArr:Array = [];
 			var arr:Array = String(value).split("");
 			var len:int = arr.length;
 			for(var i:int=0;i<len;i++)
@@ -135,61 +137,55 @@ package
 				switch(arr[i])
 				{
 					case "<":
-						outArr[i] = "&lt;";
+						arr[i] = "&lt;";
 						break;
 					case "&":
-						if(arr[i+1] == "#")
-							outArr[i] = "&";
-						else
-							outArr[i] = "&amp;";
+						if(arr[i+1] != "#")
+							arr[i] = "&amp;";
 						break;
 					case '"':
-						outArr[i] = "&quot;";
+						arr[i] = "&quot;";
 						break;
 					case "\u000A":
-						outArr[i] = "&#xA;";
+						arr[i] = "&#xA;";
 						break;
 					case "\u000D":
-						outArr[i] = "&#xD;";
+						arr[i] = "&#xD;";
 						break;
 					case "\u0009":
-						outArr[i] = "&#x9;";
+						arr[i] = "&#x9;";
 						break;
 					default:
-						outArr[i] = arr[i];
 						break;
 				}
 			}
-			return outArr.join("");
+			return arr.join("");
 		}
 
 		static private function escapeElementValue(value:String):String
 		{
 			var i:int;
-			var outArr:Array = [];
 			var arr:Array = value.split("");
-			for(i=0;i<arr.length;i++)
+			const len:uint = arr.length;
+			for(i=0;i<len;i++)
 			{
 				switch(arr[i])
 				{
 					case "<":
-						outArr[i] = "&lt;";
+						arr[i] = "&lt;";
 						break;
 					case ">":
-						outArr[i] = "&gt;";
+						arr[i] = "&gt;";
 						break;
 					case "&":
-						if(arr[i+1] == "#")
-							outArr[i] = "&";
-						else
-							outArr[i] = "&amp;";
+						if(arr[i+1] != "#")
+							arr[i] = "&amp;";
 						break;
 					default:
-						outArr[i] = arr[i];
 						break;
 				}
 			}
-			return outArr.join("");
+			return arr.join("");
 		}
 
 		static private function insertAttribute(att:Attr,parent:XML):XML
@@ -208,9 +204,15 @@ package
 			// add attributes
 			var attrs:* = node.attributes;
 			var len:int = node.attributes.length;
+			
 			for(i=0;i<len;i++)
 			{
-				insertAttribute(attrs[i],xml);
+				var att:Attr = attrs[i];
+				if (att.prefix == 'xmlns' && att.namespaceURI == 'http://www.w3.org/2000/xmlns/') {
+					//from e4x spec: NOTE Although namespaces are declared using attribute syntax in XML, they are not represented in the [[Attributes]] property.
+					xml.addNamespace(new Namespace(att.localName, att.nodeValue));
+				}
+				else insertAttribute(att,xml);
 			}
 			// loop through childNodes which will be one of:
 			// text, cdata, processing instrution or comment and add them as children of the element
@@ -218,18 +220,24 @@ package
 			len = childNodes.length;
 			for(i=0;i<len;i++)
 			{
-				var child:XML = fromNode(childNodes[i]);
-				xml.addChildInternal(child);
+				var nativeNode:Node = childNodes[i];
+				if (nativeNode.nodeType == 7 && XML.ignoreProcessingInstructions) {
+					continue;
+				}
+				var child:XML = fromNode(nativeNode);
+				if (child)
+					xml.addChildInternal(child);
 			}
 		}
 		/**
 		* returns an XML object from an existing node without the need to parse the XML.
 		* The new XML object is not normalized
+		*
+		* @royaleignorecoercion Element
 		*/
-		static private function fromNode(node:Element):XML
+		static private function fromNode(node:Node):XML
 		{
 			var xml:XML;
-			var i:int;
 			var data:* = node.nodeValue;
 			var localName:String = node.nodeName;
 			var prefix:String = node.prefix;
@@ -245,22 +253,24 @@ package
 					xml = new XML();
 					xml.setNodeKind("element");
 					xml.setName(qname);
-					iterateElement(node,xml);
+					iterateElement(node as Element,xml);
 					break;
 				//case 2:break;// ATTRIBUTE_NODE (handled separately)
 				case 3:
 					//TEXT_NODE
+					if (XML.ignoreWhitespace) {
+						data = data.trim();
+						if (!data) return null;
+					}
 					xml = new XML();
 					xml.setNodeKind("text");
-					xml.setName(qname);
-					if(XML.ignoreWhitespace)
-						data = data.trim();
+					//xml.setName(qname); e4X: the name must be null (text node rules)
 					xml.setValue(data);
 					break;
 				case 4:
 					//CDATA_SECTION_NODE
 					xml = new XML();
-					xml.setName(qname);
+					//xml.setName(qname); e4X: the name must be null (text node rules)
 					xml.setNodeKind("text");
 					data = "<![CDATA[" + data + "]]>";
 					xml.setValue(data);
@@ -276,8 +286,10 @@ package
 					break;
 				case 8:
 					//COMMENT_NODE
+					
 					xml = new XML();
 					xml.setNodeKind("comment");
+					//e4X: the name must be null (comment node rules)
 					xml.setValue(data);
 					break;
 				//case 9:break;//DOCUMENT_NODE
@@ -316,8 +328,8 @@ package
 
 		/**
 		 * [static] Returns an object with the following properties set to the default values: ignoreComments, ignoreProcessingInstructions, ignoreWhitespace, prettyIndent, and prettyPrinting.
-		 * @return 
-		 * 
+		 * @return
+		 *
 		 */
 		static public function defaultSettings():Object
 		{
@@ -333,7 +345,7 @@ package
 		/**
 		 * [static] Sets values for the following XML properties: ignoreComments, ignoreProcessingInstructions, ignoreWhitespace, prettyIndent, and prettyPrinting.
 		 * @param rest
-		 * 
+		 *
 		 */
 		static public function setSettings(value:Object):void
 		{
@@ -349,9 +361,9 @@ package
 		
 		/**
 		 * [static] Retrieves the following properties: ignoreComments, ignoreProcessingInstructions, ignoreWhitespace, prettyIndent, and prettyPrinting.
-		 * 
-		 * @return 
-		 * 
+		 *
+		 * @return
+		 *
 		 */
 		static public function settings():Object
 		{
@@ -398,7 +410,7 @@ package
 			// _children = [];
 			if(xml)
 			{
-				var xmlStr:String = "" + xml;
+				var xmlStr:String = ignoreWhitespace ? trimXMLWhitespace("" + xml) : "" + xml;
 				if(xmlStr.indexOf("<") == -1)
 				{
 					_nodeKind = "text";
@@ -418,11 +430,15 @@ package
 					configurable: true
 				}
 			);
-			
 		}
 		private static var xmlRegEx:RegExp = /&(?![\w]+;)/g;
 		private static var parser:DOMParser;
 		private static var errorNS:String;
+		
+		/**
+		 *
+		 * @royaleignorecoercion Element
+		 */
 		private function parseXMLStr(xml:String):void
 		{
 			//escape ampersands
@@ -440,6 +456,10 @@ package
 					errorNS = "na";
 				}
 			}
+			//various node types not supported directly
+			//maybe it should always wrap (e4x seems to say yes on p34, 'Semantics' of e4x-Ecma-357.pdf)
+			var wrap:Boolean = (xml.indexOf('<?') == 0 && xml.indexOf('<?xml ') != 0) || (xml.indexOf('<![CDATA[') == 0) || (xml.indexOf('<!--') == 0);
+			if (wrap) xml = '<parseRoot>'+xml+'</parseRoot>';
 			try
 			{
 				var doc:Document = parser.parseFromString(xml, "application/xml");
@@ -453,9 +473,10 @@ package
 			var errorNodes:NodeList = doc.getElementsByTagNameNS(errorNS, 'parsererror');
 			if(errorNodes.length > 0)
 				throw new Error(errorNodes[0].innerHTML);
+			if (wrap) doc = doc.childNodes[0];
 			for(var i:int=0;i<doc.childNodes.length;i++)
 			{
-				var node:Element = doc.childNodes[i];
+				var node:Node = doc.childNodes[i];
 				if(node.nodeType == 1)
 				{
 					_version = doc.xmlVersion;
@@ -465,16 +486,52 @@ package
 					// _name.prefix = node.prefix;
 					// _name.uri = node.namespaceURI;
 					// _name.localName = node.localName;
-					iterateElement(node,this);
+					iterateElement(node as Element,this);
 				}
 				else
 				{
+					if (node.nodeType == 7) {
+						if (XML.ignoreProcessingInstructions) {
+							this.setNodeKind('text');
+							//e4x: The value of the [[Name]] property is null if and only if the XML object represents an XML comment or text node
+							_name = null;
+							this.setValue('');
+						} else {
+							this.setNodeKind('processing-instruction');
+							this.setName(node.nodeName);
+							this.setValue(node.nodeValue);
+						}
+						
+					} else if (node.nodeType == 4) {
+						this.setNodeKind('text');
+						//e4x: The value of the [[Name]] property is null if and only if the XML object represents an XML comment or text node
+						_name = null;
+						if (node.nodeName == '#cdata-section') {
+							this.setValue('<![CDATA[' + node.nodeValue + ']]>');
+						} else {
+							this.setValue(node.nodeValue);
+						}
+					} else if (node.nodeType == 8) {
+						//e4x: The value of the [[Name]] property is null if and only if the XML object represents an XML comment or text node
+						_name = null;
+						if (XML.ignoreComments) {
+							this.setNodeKind('text');
+							this.setValue('');
+						} else {
+							this.setNodeKind('comment');
+							this.setValue(node.nodeValue);
+						}
+						
+						
+					}
+
 					// Do we record the nodes which are probably processing instructions?
 //						var child:XML = XML.fromNode(node);
 //						addChild(child);
 				}
 			}
-			normalize();
+			//normalize seems wrong here:
+			//normalize();
 		//need to deal with errors https://bugzilla.mozilla.org/show_bug.cgi?id=45566
 		// get rid of nodes we do not want
 		//loop through the child nodes and build XML obejcts for each.
@@ -499,15 +556,13 @@ package
 			
 			return _namespaces;
 		}
-		private var _origStr:String;
-
 
 		/**
 		 * @private
-		 * 
+		 *
 		 * Similar to appendChild, but accepts all XML types (text, comment, processing-instruction, attribute, or element)
 		 *
-		 * 	
+		 *
 		 */
 		public function addChild(child:XML):void
 		{
@@ -527,7 +582,7 @@ package
             {
                 // don't add child
             }
-			else				
+			else
 				getChildren().push(child);
 			
 		}
@@ -552,8 +607,8 @@ package
 		 * Adds a namespace to the set of in-scope namespaces for the XML object.
 		 *
 		 * @param ns
-		 * @return 
-		 * 	
+		 * @return
+		 *
 		 */
 		public function addNamespace(ns:Namespace):XML
 		{
@@ -612,36 +667,40 @@ package
 		 * Appends the given child to the end of the XML object's properties.
 		 *
 		 * @param child
-		 * @return 
-		 * 
+		 * @return
+		 *
+		 * @royaleignorecoercion XML
+		 *
 		 */
 		public function appendChild(child:*):XML
 		{
 			/*
-				[[Insert]] (P, V)
-				1. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", "attribute"}, return
-				2. Let i = ToUint32(P)
-				3. If (ToString(i) is not equal to P), throw a TypeError exception
-				4. If Type(V) is XML and (V is x or an ancestor of x) throw an Error exception
-				5. Let n = 1
-				6. If Type(V) is XMLList, let n = V.[[Length]]
-				7. If n == 0, Return
-				8. For j = x.[[Length]]-1 downto i, rename property ToString(j) of x to ToString(j + n)
-				9. Let x.[[Length]] = x.[[Length]] + n
-				10. If Type(V) is XMLList
-				  a. For j = 0 to V.[[Length-1]]
-				    i. V[j].[[Parent]] = x
-				    ii. x[i + j] = V[j]
-				11. Else
-				  a. Call the [[Replace]] method of x with arguments i and V
-				12. Return
+			1. Let children be the result of calling the [[Get]] method of x with argument "*"
+			2. Call the [[Put]] method of children with arguments children.[[Length]] and child
+			3. Return x
+		
 			*/
 			var childType:String = typeof child;
-			if(childType != "object")
-				child = xmlFromStringable(child);
+			
+			if(childType != "object") {
+                var last:uint = childrenLength();
+				const lastChild:XML = last ? _children[last-1] : null;
+				if (lastChild && lastChild.nodeKind() == 'element') {
+					
+					const wrapper:XML = new XML();
+					child = new XML(child.toString());
+					wrapper.setName(lastChild.name());
+                    child.setParent(wrapper);
+                    wrapper.getChildren().push(child);
+					child = wrapper;
+				} else {
+                    child = xmlFromStringable(child);
+				}
+			}
 			
 			appendChildInternal(child);
-			normalize();
+			//normalize seems not correct here:
+			//normalize();
 			return this;
 		}
 		
@@ -667,8 +726,8 @@ package
 		 * Returns the XML value of the attribute that has the name matching the attributeName parameter.
 		 *
 		 * @param attributeName
-		 * @return 
-		 * 
+		 * @return
+		 *
 		 */
 		public function attribute(attributeName:*):XMLList
 		{
@@ -692,8 +751,8 @@ package
 		/**
 		 * Returns a list of attribute values for the given XML object.
 		 *
-		 * @return 
-		 * 
+		 * @return
+		 *
 		 */
 		public function attributes():XMLList
 		{
@@ -711,13 +770,13 @@ package
 		 * Lists the children of an XML object.
 		 *
 		 * @param propertyName
-		 * @return 
-		 * 
+		 * @return
+		 *
 		 */
 		public function child(propertyName:Object):XMLList
 		{
 			/*
-			 * 
+			 *
 			When the [[Get]] method of an XML object x is called with property name P, the following steps are taken:
 			1. If ToString(ToUint32(P)) == P
 			  a. Let list = ToXMLList(x)
@@ -758,9 +817,10 @@ package
 			else
 			{
 				len = childrenLength();
+				var all:Boolean = propertyName.localName == "*";
 				for(i=0;i<len;i++)
 				{
-					if(propertyName.matches(_children[i].name()))
+					if(all || propertyName.matches(_children[i].name()))
 						list.append(_children[i]);
 				}
 			}
@@ -772,8 +832,8 @@ package
 		/**
 		 * Identifies the zero-indexed position of this XML object within the context of its parent.
 		 *
-		 * @return 
-		 * 
+		 * @return
+		 *
 		 */
 		public function childIndex():int
 		{
@@ -786,8 +846,8 @@ package
 		/**
 		 * Lists the children of the XML object in the sequence in which they appear.
 		 *
-		 * @return 
-		 * 
+		 * @return
+		 *
 		 */
 		public function children():XMLList
 		{
@@ -804,8 +864,8 @@ package
 		/**
 		 * Lists the properties of the XML object that contain XML comments.
 		 *
-		 * @return 
-		 * 
+		 * @return
+		 *
 		 */
 		public function comments():XMLList
 		{
@@ -845,8 +905,8 @@ package
 		 * Compares the XML object against the given value parameter.
 		 *
 		 * @param value
-		 * @return 
-		 * 
+		 * @return
+		 *
 		 */
 		public function contains(value:*):Boolean
 		{
@@ -857,9 +917,9 @@ package
 		
 		/**
 		 * Returns a copy of the given XML object.
-		 * 
-		 * @return 
-		 * 
+		 *
+		 * @return
+		 *
 		 */
 		public function copy():XML
 		{
@@ -911,10 +971,10 @@ package
 		
 		/**
 		 * Returns all descendants (children, grandchildren, great-grandchildren, and so on) of the XML object that have the given name parameter.
-		 * 
+		 *
 		 * @param name
-		 * @return 
-		 * 
+		 * @return
+		 *
 		 */
 		public function descendants(name:Object = "*"):XMLList
 		{
@@ -957,17 +1017,17 @@ package
 						list.append(_children[i]);
 
 					list.concat(_children[i].descendants(name));
-				} 
+				}
 			}
 			return list;
 		}
 		
 		/**
 		 * Lists the elements of an XML object. (handles E4X dot notation)
-		 * 
+		 *
 		 * @param name
-		 * @return 
-		 * 
+		 * @return
+		 *
 		 */
 		public function elements(name:Object = "*"):XMLList
 		{
@@ -1172,9 +1232,9 @@ package
 		}
 		/**
 		 * Checks to see whether the XML object contains complex content.
-		 * 
-		 * @return 
-		 * 
+		 *
+		 * @return
+		 *
 		 */
 		public function hasComplexContent():Boolean
 		{
@@ -1241,12 +1301,12 @@ package
 			}
 			return false;
 		}
-				
+		
 		/**
 		 * Checks to see whether the XML object contains simple content.
-		 * 
-		 * @return 
-		 * 
+		 *
+		 * @return
+		 *
 		 */
 		public function hasSimpleContent():Boolean
 		{
@@ -1271,9 +1331,9 @@ package
 		
 		/**
 		 * Lists the namespaces for the XML object, based on the object's parent.
-		 * 
-		 * @return 
-		 * 
+		 *
+		 * @return
+		 *
 		 */
 		public function inScopeNamespaces():Array
 		{
@@ -1313,11 +1373,11 @@ package
 		}
 		/**
 		 * Inserts the given child2 parameter after the child1 parameter in this XML object and returns the resulting object.
-		 * 
+		 *
 		 * @param child1
 		 * @param child2
-		 * @return 
-		 * 
+		 * @return
+		 *
 		 */
 		public function insertChildAfter(child1:XML, child2:XML):XML
 		{
@@ -1349,11 +1409,11 @@ package
 		
 		/**
 		 * Inserts the given child2 parameter before the child1 parameter in this XML object and returns the resulting object.
-		 * 
+		 *
 		 * @param child1
 		 * @param child2
-		 * @return 
-		 * 
+		 * @return
+		 *
 		 */
 		public function insertChildBefore(child1:XML, child2:XML):XML
 		{
@@ -1368,7 +1428,7 @@ package
 				i. If x[i] is the same object as child1
 				1. Call the [[Insert]] method of x with arguments ToString(i) and child2
 				2. Return x
-				4. Return			
+				4. Return
 			*/
 			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind == "attribute")
 				return null;
@@ -1388,9 +1448,9 @@ package
 		
 		/**
 		 * For XML objects, this method always returns the integer 1.
-		 * 
-		 * @return 
-		 * 
+		 *
+		 * @return
+		 *
 		 */
 		public function length():int
 		{
@@ -1399,36 +1459,36 @@ package
 		
 		/**
 		 * Gives the local name portion of the qualified name of the XML object.
-		 * 
-		 * @return 
-		 * 
+		 *
+		 * @return
+		 *
 		 */
 		public function localName():String
 		{
-			return name().localName;
+			return _name? _name.localName : null;
 		}
 
 		private var _name:QName;
 		
 		/**
 		 * Gives the qualified name for the XML object.
-		 * 
-		 * @return 
-		 * 
+		 *
+		 * @return
+		 *
 		 */
 		public function name():QName
 		{
-			if(!_name)
-				_name = getQName("","","",false);
+			/*if(!_name)
+				_name = getQName("","","",false);*/
 			return _name;
 		}
 		
 		/**
 		 * If no parameter is provided, gives the namespace associated with the qualified name of this XML object.
-		 * 
+		 *
 		 * @param prefix
-		 * @return 
-		 * 
+		 * @return
+		 *
 		 */
 		public function namespace(prefix:String = null):*
 		{
@@ -1470,9 +1530,9 @@ package
 		
 		/**
 		 * Lists namespace declarations associated with the XML object in the context of its parent.
-		 * 
-		 * @return 
-		 * 
+		 *
+		 * @return
+		 *
 		 */
 		public function namespaceDeclarations():Array
 		{
@@ -1530,8 +1590,8 @@ package
 		private var _nodeKind:String = "element";
 		/**
 		 * Specifies the type of node: text, comment, processing-instruction, attribute, or element.
-		 * @return 
-		 * 
+		 * @return
+		 *
 		 */
 		public function nodeKind():String
 		{
@@ -1540,9 +1600,9 @@ package
 		
 		/**
 		 * For the XML object and all descendant XML objects, merges adjacent text nodes and eliminates empty text nodes.
-		 * 
-		 * @return 
-		 * 
+		 *
+		 * @return
+		 *
 		 */
 		public function normalize():XML
 		{
@@ -1577,9 +1637,9 @@ package
 		
 		/**
 		 * Returns the parent of the XML object.
-		 * 
-		 * @return 
-		 * 
+		 *
+		 * @return
+		 *
 		 */
 		public function parent():*
 		{
@@ -1604,8 +1664,8 @@ package
 		/**
 		 * Inserts the provided child object into the XML element before any existing XML properties for that element.
 		 * @param value
-		 * @return 
-		 * 
+		 * @return
+		 *
 		 */
 		public function prependChild(child:XML):XML
 		{
@@ -1639,10 +1699,10 @@ package
 		
 		/**
 		 * If a name parameter is provided, lists all the children of the XML object that contain processing instructions with that name.
-		 * 
+		 *
 		 * @param name
-		 * @return 
-		 * 
+		 * @return
+		 *
 		 */
 		public function processingInstructions(name:String = "*"):XMLList
 		{
@@ -1660,10 +1720,10 @@ package
 		
 		/**
 		 * Removes the given chid for this object and returns the removed child.
-		 * 
+		 *
 		 * @param child
-		 * @return 
-		 * 
+		 * @return
+		 *
 		 */
 		public function removeChild(child:XML):Boolean
 		{
@@ -1777,10 +1837,10 @@ package
 
 		/**
 		 * Removes the given namespace for this object and all descendants.
-		 * 
+		 *
 		 * @param ns
-		 * @return 
-		 * 
+		 * @return
+		 *
 		 */
 		public function removeNamespace(ns:*):XML
 		{
@@ -1842,11 +1902,11 @@ package
 		
 		/**
 		 * Replaces the properties specified by the propertyName parameter with the given value parameter.
-		 * 
+		 *
 		 * @param propertyName
 		 * @param value
-		 * @return 
-		 * 
+		 * @return
+		 *
 		 */
 		public function replace(propertyName:Object, value:*):*
 		{
@@ -1866,7 +1926,7 @@ package
 				    ii. Let i = k
 				8. If i == undefined, return x
 				9. Call the [[Replace]] method of x with arguments ToString(i) and c
-				10. Return x			
+				10. Return x
 			*/
 		
 			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind ==  "attribute")
@@ -2027,16 +2087,16 @@ package
 		/**
 		 * Replaces the child properties of the XML object with the specified name with the specified XML or XMLList.
 		 * This is primarily used to support dot notation assignment of XML.
-		 * 
+		 *
 		 * @param value
-		 * @return 
-		 * 
+		 * @return
+		 *
 		 */
 		public function setChild(elementName:*, elements:Object):Object
 		{
 			
 			/*
-			 * 
+			 *
 			1. If ToString(ToUint32(P)) == P, throw a TypeError exception NOTE this operation is reserved for future versions of E4X.
 			2. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", "attribute"}, return
 			3. If (Type(V) ∉ {XML, XMLList}) or (V.[[Class]] ∈ {"text", "attribute"})
@@ -2180,10 +2240,10 @@ package
 
 		/**
 		 * Replaces the child properties of the XML object with the specified set of XML properties, provided in the value parameter.
-		 * 
+		 *
 		 * @param value
-		 * @return 
-		 * 
+		 * @return
+		 *
 		 */
 		public function setChildren(value:Object):XML
 		{
@@ -2236,9 +2296,9 @@ package
 		
 		/**
 		 * Changes the local name of the XML object to the given name parameter.
-		 * 
+		 *
 		 * @param name
-		 * 
+		 *
 		 */
 		public function setLocalName(name:String):void
 		{
@@ -2251,12 +2311,26 @@ package
 		
 		/**
 		 * Sets the name of the XML object to the given qualified name or attribute name.
-		 * 
+		 *
 		 * @param name
-		 * 
+		 *
 		 */
 		public function setName(name:*):void
 		{
+			//@todo add tests to review against the following:
+			/*1. If x.[[Class]] ∈ {"text", "comment"}, return
+			2. If (Type(name) is Object) and (name.[[Class]] == "QName") and (name.uri == null)
+			a. Let name = name.localName
+			3. Let n be a new QName created if by calling the constructor new QName(name)
+			4. If x.[[Class]] == "processing-instruction", let n.uri be the empty string
+			5. Let x.[[Name]] = n
+			6. Let ns be a new Namespace created as if by calling the constructor new Namespace(n.prefix, n.uri)
+			7. If x.[[Class]] == "attribute"
+			a. If x.[[Parent]] == null, return
+			b. Call x.[[Parent]].[[AddInScopeNamespace]](ns)
+			8. If x.[[Class]] == "element"
+			a. Call x.[[AddInScopeNamespace]](ns)*/
+			if (_nodeKind == 'text' || _nodeKind == 'comment') return; //e4x, see 1 above
 			var nameRef:QName;
 			if(name is QName)
 				nameRef = name;
@@ -2268,34 +2342,35 @@ package
 		
 		/**
 		 * Sets the namespace associated with the XML object.
-		 * 
+		 *
 		 * @param ns
-		 * 
+		 *
 		 */
 		public function setNamespace(ns:Object):void
 		{
-			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction")
+			var kind:String = _nodeKind;
+			if(kind == "text" || kind == "comment" || kind == "processing-instruction")
 				return;
 			var ns2:Namespace = new Namespace(ns);
 			var nameRef:QName = new QName(ns2,name());
 			
-			if(_nodeKind == "attribute")
+			if(kind == "attribute")
 			{
-				nameRef.isAttribute = true;
 				if(_parent == null)
 					return;
+				nameRef.isAttribute = true;
 				_parent.addNamespace(ns2);
 			}
-
+			
 			_name = getQName(nameRef.localName,nameRef.prefix,nameRef.uri,nameRef.isAttribute);
 
-			if(_nodeKind == "element")
+			if(kind == "element")
 				addNamespace(ns2);
 		}
 
 		/**
 		 * @private
-		 * 
+		 *
 		 */
 		public function setNodeKind(value:String):void
 		{
@@ -2321,7 +2396,7 @@ package
 
 		/**
 		 * @private
-		 * 
+		 *
 		 * Allows XMLList to get the targetObject of its targetObject and not error when it gets the XML
 		 */
 		public function get targetObject():*
@@ -2331,9 +2406,9 @@ package
 		
 		/**
 		 * Returns an XMLList object of all XML properties of the XML object that represent XML text nodes.
-		 * 
-		 * @return 
-		 * 
+		 *
+		 * @return
+		 *
 		 */
 		public function text():XMLList
 		{
@@ -2351,10 +2426,10 @@ package
 		
 		/**
 		 * Provides an overridable method for customizing the JSON encoding of values in an XML object.
-		 * 
+		 *
 		 * @param k
-		 * @return 
-		 * 
+		 * @return
+		 *
 		 */
 		 /*
 		override public function toJSON(k:String):String
@@ -2365,9 +2440,9 @@ package
 
 		/**
 		 * Returns a string representation of the XML object.
-		 * 
-		 * @return 
-		 * 
+		 *
+		 * @return
+		 *
 		 */
 		public function toString():String
 		{
@@ -2458,9 +2533,9 @@ package
 		
 		/**
 		 * Returns a string representation of the XML object.
-		 * 
-		 * @return 
-		 * 
+		 *
+		 * @return
+		 *
 		 */
 		public function toXMLString(indentLevel:int=0,ancestors:Array=null):String
 		{
@@ -2541,7 +2616,7 @@ package
 				  a. Let s be the result of concatenating s, namespace.prefix and the string ":"
 				26. Let s be the result of concatenating s, x.[[Name]].localName and the string ">"
 				27. Return s
-				NOTE Implementations may also preserve insignificant whitespace (e.g., inside and between element tags) and attribute quoting conventions in ToXMLString().			
+				NOTE Implementations may also preserve insignificant whitespace (e.g., inside and between element tags) and attribute quoting conventions in ToXMLString().
 			*/
 			var i:int;
 			var len:int;
@@ -2553,26 +2628,28 @@ package
 				indentArr.push(_indentStr);
 
 			var indent:String = indentArr.join("");
-			if(this.nodeKind() == "text")
+			const nodeType:String = this.nodeKind();
+			if(nodeType == "text") //4.
 			{
 				if(prettyPrinting)
 				{
 					var v:String = trimXMLWhitespace(_value);
-					if(name().localName == "#cdata-section")
+					if (v.indexOf('<![CDATA[') == 0) {
 						return indent + v;
+					}
 					return indent + escapeElementValue(v);
 				}
-				if(name().localName == "#cdata-section")
+				if (_value.indexOf('<![CDATA[') == 0)
 					return _value;
 				return escapeElementValue(_value);
 			}
-			if(this.nodeKind() == "attribute")
+			if(nodeType == "attribute")
 				return indent + escapeAttributeValue(_value);
 
-			if(this.nodeKind() == "comment")
+			if(nodeType == "comment")
 				return indent + "<!--" +  _value + "-->";
 
-			if(this.nodeKind() == "processing-instruction")
+			if(nodeType == "processing-instruction")
 				return indent + "<?" + name().localName + " " + _value + "?>";
 
 			// We excluded the other types, so it's a normal element
@@ -2605,32 +2682,16 @@ package
 				ns.prefix = "";
 				declarations.push(ns);
 			}
-			if(XML.prettyPrinting)
+			if(XML.prettyPrinting && indentLevel > 0)
 			{
-				strArr.push(new Array(indentLevel).join(' '));
+				strArr.push(new Array(indentLevel + 1).join(_indentStr));
 			}
 			strArr.push("<");
 			if(ns.prefix)
 				strArr.push(ns.prefix+":");
 			strArr.push(name().localName);
-
+			
 			//attributes and namespace declarations... (15-16)
-			for(i=0;i<declarations.length;i++)
-			{
-				var decVal:String = escapeAttributeValue(declarations[i].uri);
-				if(decVal)
-				{
-					strArr.push(" xmlns");
-					if(declarations[i].prefix)
-					{
-						strArr.push(":");
-						strArr.push(declarations[i].prefix);
-					}
-					strArr.push('="');
-					strArr.push(decVal);
-					strArr.push('"');
-				}
-			}
 			len = attributeLength();
 			for(i=0;i<len;i++)
 			{
@@ -2649,6 +2710,24 @@ package
 				strArr.push(escapeAttributeValue(_attributes[i].getValue()));
 				strArr.push('"');
 			}
+			// see 15. namespace declarations is after
+			for(i=0;i<declarations.length;i++)
+			{
+				var decVal:String = escapeAttributeValue(declarations[i].uri);
+				if(decVal)
+				{
+					strArr.push(" xmlns");
+					if(declarations[i].prefix)
+					{
+						strArr.push(":");
+						strArr.push(declarations[i].prefix);
+					}
+					strArr.push('="');
+					strArr.push(decVal);
+					strArr.push('"');
+				}
+			}
+			
 			// now write elements or close the tag if none exist
 			len = childrenLength();
 			if(len == 0)
@@ -2660,7 +2739,7 @@ package
 			var indentChildren:Boolean = len > 1 || (len == 1 && _children[0].nodeKind() != "text");
 			var nextIndentLevel:int;
 			if(XML.prettyPrinting && indentChildren)
-				nextIndentLevel = indentLevel + prettyIndent;
+				nextIndentLevel = indentLevel + 1;
 			else
 				nextIndentLevel = 0;
 			for(i=0;i<len;i++)
@@ -2673,7 +2752,8 @@ package
 			if(XML.prettyPrinting && indentChildren)
 			{
 				strArr.push("\n");
-				strArr.push(new Array(indentLevel + 1).join(' '));
+				if (indentLevel > 0)
+					strArr.push(new Array(indentLevel + 1).join(_indentStr));
 			}
 			strArr.push("</");
 			if(ns.prefix)
@@ -2689,9 +2769,9 @@ package
 		
 		/**
 		 * Returns the XML object.
-		 * 
-		 * @return 
-		 * 
+		 *
+		 * @return
+		 *
 		 */
 		override public function valueOf():*
 		{
@@ -2709,7 +2789,7 @@ package
 		///
 		///
 		/// METHODS to allow XML to behave as if it's a string or number
-		/// 
+		///
 		///
 		////////////////////////////////////////////////////////////////
 		
diff --git a/frameworks/projects/XML/src/main/royale/XMLList.as b/frameworks/projects/XML/src/main/royale/XMLList.as
index 49a902d..a54df14 100644
--- a/frameworks/projects/XML/src/main/royale/XMLList.as
+++ b/frameworks/projects/XML/src/main/royale/XMLList.as
@@ -603,6 +603,28 @@ package
 			    i. Let i = i + 1
 			3. Return list
 			*/
+			var len:uint = _xmlArray.length;
+            var textAccumulator:XML;
+			for (var i:int=0; i<len; i++) {
+				var node:XML = XML(_xmlArray[i]);
+				var nodeKind:String = node.nodeKind();
+				if (nodeKind == 'element' ) {
+                    node.normalize();
+                    textAccumulator = null;
+				} else if (nodeKind == 'text') {
+					if (textAccumulator) {
+                        textAccumulator.setValue(textAccumulator.getValue() + node.getValue());
+                        removeChildAt(i);
+						i--;
+						len--;
+					} else {
+                        textAccumulator = node;
+					}
+				} else {
+                    textAccumulator = null;
+				}
+			}
+			
 			return this;
 		}
 		
@@ -973,26 +995,37 @@ package
 				if(str)
 					retVal.push(str);
 			}
-			return retVal.join("");
+			return retVal.join("\n");
 		}
 		
 		/**
 		 * Returns a string representation of all the XML objects in an XMLList object.
 		 * 
 		 * @return 
-		 * 
+		 *
+		 * @royaleignorecoercion XML
 		 */
 		public function toString():String
 		{
 			var retVal:Array = [];
 			var len:int = _xmlArray.length;
+			var cumulativeText:String = '';
 			for (var i:int=0;i<len;i++)
 			{
 				var str:String = _xmlArray[i].toString();
-				if(str)
-					retVal.push(str);
+				if (XML(_xmlArray[i]).nodeKind() == 'text') {
+					cumulativeText += str;
+				} else {
+					if (cumulativeText) {
+                        retVal.push(cumulativeText);
+                        cumulativeText = '';
+					}
+                    if(str)
+                        retVal.push(str);
+				}
 			}
-			return retVal.join("");
+            if (cumulativeText) retVal.push(cumulativeText);
+			return retVal.join("\n");
 		}
 		
 		/**
diff --git a/frameworks/projects/pom.xml b/frameworks/projects/pom.xml
index 6ef1fef..f4fbf53 100644
--- a/frameworks/projects/pom.xml
+++ b/frameworks/projects/pom.xml
@@ -85,7 +85,7 @@
         <configuration>
           <!-- We don't want dependencies to be linked into the resulting libraries -->
           <forceSwcExternalLibraryPath>true</forceSwcExternalLibraryPath>
-          <additionalCompilerOptions>-js-default-initializers=false;-source-map=true</additionalCompilerOptions>
+          <additionalCompilerOptions>-js-default-initializers=false;-source-map=true;-js-complex-implicit-coercions=false;-js-vector-index-checks=false;-js-resolve-uncertain=false</additionalCompilerOptions>
         </configuration>
       </plugin>
     </plugins>
diff --git a/manualtests/UnitTests/build.xml b/manualtests/UnitTests/build.xml
index 55b9a7d..e4fbad5 100644
--- a/manualtests/UnitTests/build.xml
+++ b/manualtests/UnitTests/build.xml
@@ -22,11 +22,12 @@
 <project name="UnitTests" default="main" basedir=".">
     <property name="ROYALE_HOME" location="../.."/>
     <property name="example" value="UnitTests" />
-
     <!-- adding flexuint style meta collection, and additional testing meta tags (Event,Bindable,TestMeta)-->
-    <property name="theme_arg" value="-keep-as3-metadata+=Test,BeforeClass,AfterClass,Before,After,TestVariance,Event,Bindable,TestMeta" />
+    <!--<property name="theme_arg" value="-keep-as3-metadata+=Test,BeforeClass,AfterClass,Before,After,TestVariance,Event,Bindable,TestMeta" />-->
+    <property name="theme_arg" value="-keep-code-with-metadata=Test,BeforeClass,AfterClass,Before,After,TestVariance,TestMeta" />
     <!-- adding flexuint style meta collection, and additional testing meta tags (Event,Bindable,TestMeta)-->
-    <property name="extlib_arg" value="-keep-code-with-metadata=Test,BeforeClass,AfterClass,Before,After,TestVariance,TestMeta" />
+    <!--<property name="extlib_arg" value="-keep-code-with-metadata=Test,BeforeClass,AfterClass,Before,After,TestVariance,TestMeta" />-->
+    <property name="swf.version" value="30" />
 
     <property file="${ROYALE_HOME}/env.properties"/>
     <property environment="env"/>
@@ -35,16 +36,19 @@
 
 	<!-- make ant src and output consistent with maven -->
 	<property name="maven_compat" value="true"/>
-
+    <!--<property name="swf.version" value="30" />
+    <property name="playerglobal.version" value="19" />-->
+    <property name="destDir" value="${basedir}/target/swf"/>
+    <property name="html_template_base" value="${basedir}/src/main/resources" />
     <include file="${basedir}/../build_example.xml" />
 
-    <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
+    <target name="main" depends="clean" description="Clean build of ${example}">
+        <antcall target="build_example.compile">
+            <param name="debug" value="false"/>
+        </antcall>
     </target>
 
     <target name="clean">
-        <delete dir="${basedir}/bin" failonerror="false" />
-        <delete dir="${basedir}/bin-debug" failonerror="false" />
-        <delete dir="${basedir}/bin-release" failonerror="false" />
         <delete dir="${basedir}/target" failonerror="false" />
     </target>
 
diff --git a/manualtests/UnitTests/pom.xml b/manualtests/UnitTests/pom.xml
index 6baaf7a..a411728 100644
--- a/manualtests/UnitTests/pom.xml
+++ b/manualtests/UnitTests/pom.xml
@@ -35,7 +35,7 @@
 		<bgcolor>#ffffff</bgcolor>
 		<useBrowserHistory>--</useBrowserHistory>
 		<version_major>11</version_major>
-		<version_minor>1</version_minor>
+		<version_minor>5</version_minor>
 		<version_revision>0</version_revision>
 		<expressInstallSwf>expressInstall.swf</expressInstallSwf>
 		<application>${project.artifactId}</application>
@@ -52,15 +52,22 @@
 				<artifactId>royale-maven-plugin</artifactId>
 				<extensions>true</extensions>
 				<configuration>
-					<targets>SWF</targets>
+					<targets>SWF,JSRoyale</targets>
 					<mainClass>${project.artifactId}.mxml</mainClass>
                     <removeCirculars>true</removeCirculars>
-					<debug>true</debug>
-					<additionalCompilerOptions>-js-default-initializers;-keep-as3-metadata+=Test,BeforeClass,AfterClass,Before,After,TestVariance,Event,Bindable,TestMeta;-keep-code-with-metadata=Test,BeforeClass,AfterClass,Before,After,TestVariance,TestMeta</additionalCompilerOptions>
-					<outputDirectory>${basedir}/target/bin-debug</outputDirectory>
-					<flashOutputFileName>${project.artifactId}.swf</flashOutputFileName>
+					<debug>false</debug>
+					<additionalCompilerOptions>
+						-swf-version=30;
+						-js-default-initializers;
+						-source-map=true;
+						-keep-as3-metadata+=Test,BeforeClass,AfterClass,Before,After,TestVariance,Event,Bindable,TestMeta;
+						-keep-code-with-metadata=Test,BeforeClass,AfterClass,Before,After,TestVariance,TestMeta;
+					</additionalCompilerOptions>
+					<outputDirectory>${basedir}/target</outputDirectory>
+					<flashOutputFileName>swf/${project.artifactId}.swf</flashOutputFileName>
+					<javascriptOutputDirectoryName>javascript</javascriptOutputDirectoryName>
 				</configuration>
-				<executions>
+				<!--<executions>
 					<execution>
 						<id>compile-js</id>
 						<phase>process-sources</phase>
@@ -71,11 +78,11 @@
 							<targets>JSRoyale</targets>
 							<mainClass>${project.artifactId}.mxml</mainClass>
 							<debug>false</debug>
-							<additionalCompilerOptions>-js-default-initializers;-keep-as3-metadata+=Test,BeforeClass,AfterClass,Before,After,TestVariance,Event,Bindable,TestMeta;-keep-code-with-metadata=Test,BeforeClass,AfterClass,Before,After,TestVariance,TestMeta</additionalCompilerOptions>
+							<additionalCompilerOptions>-js-default-initializers;-source-map=true;-keep-as3-metadata+=Test,BeforeClass,AfterClass,Before,After,TestVariance,Event,Bindable,TestMeta;-keep-code-with-metadata=Test,BeforeClass,AfterClass,Before,After,TestVariance,TestMeta</additionalCompilerOptions>
 							<outputDirectory>${basedir}/target</outputDirectory>
 						</configuration>
 					</execution>
-				</executions>
+				</executions>-->
 			</plugin>
 			<plugin>
 				<artifactId>maven-resources-plugin</artifactId>
@@ -88,7 +95,7 @@
 							<goal>copy-resources</goal>
 						</goals>
 						<configuration>
-							<outputDirectory>${basedir}/target/bin-debug</outputDirectory>
+							<outputDirectory>${basedir}/target/swf</outputDirectory>
 							<includeEmptyDirs>true</includeEmptyDirs>
 							<resources>
 								<resource>
@@ -112,8 +119,8 @@
 							<goal>rename</goal>
 						</goals>
 						<configuration>
-							<sourceFile>${basedir}/target/bin-debug/index.template.html</sourceFile>
-							<destinationFile>${basedir}/target/bin-debug/${project.artifactId}.html</destinationFile>
+							<sourceFile>${basedir}/target/swf/index.template.html</sourceFile>
+							<destinationFile>${basedir}/target/swf/${project.artifactId}.html</destinationFile>
 						</configuration>
 					</execution>
 				</executions>
@@ -168,6 +175,20 @@
 		</dependency>
 		<dependency>
 			<groupId>org.apache.royale.framework</groupId>
+			<artifactId>Network</artifactId>
+			<version>0.9.6-SNAPSHOT</version>
+			<type>swc</type>
+			<classifier>swf</classifier>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.royale.framework</groupId>
+			<artifactId>Network</artifactId>
+			<version>0.9.6-SNAPSHOT</version>
+			<type>swc</type>
+			<classifier>js</classifier>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.royale.framework</groupId>
 			<artifactId>XML</artifactId>
 			<version>0.9.6-SNAPSHOT</version>
 			<type>swc</type>
diff --git a/manualtests/UnitTests/src/main/config/compile-app-config.xml b/manualtests/UnitTests/src/main/config/compile-app-config.xml
index 8774ac7..9e40011 100644
--- a/manualtests/UnitTests/src/main/config/compile-app-config.xml
+++ b/manualtests/UnitTests/src/main/config/compile-app-config.xml
@@ -17,10 +17,25 @@
 
 -->
 <royale-config>
-    <js-output-optimization>
+   <!--
+   <js-output-optimization>
         <optimization>skipFunctionCoercions</optimization>
     </js-output-optimization>
+    -->
     <js-default-initializers>true</js-default-initializers>
+    <swf-version>30</swf-version>
+    <source-map>true</source-map>
     <compiler>
+        <keep-as3-metadata append="true">
+            <name>Test</name>
+            <name>BeforeClass</name>
+            <name>AfterClass</name>
+            <name>Before</name>
+            <name>After</name>
+            <name>TestVariance</name>
+            <name>Event</name>
+            <name>Bindable</name>
+            <name>TestMeta</name>
+        </keep-as3-metadata>
     </compiler>
 </royale-config>
diff --git a/manualtests/UnitTests/src/main/royale/MyInitialView.mxml b/manualtests/UnitTests/src/main/royale/MyInitialView.mxml
index 8f72540..32eaa9e 100644
--- a/manualtests/UnitTests/src/main/royale/MyInitialView.mxml
+++ b/manualtests/UnitTests/src/main/royale/MyInitialView.mxml
@@ -25,14 +25,34 @@ limitations under the License.
 >
 
 	<fx:Style>
-		.title {
+
+		@namespace "library://ns.apache.org/royale/basic";
+		Label {
 			font-size: 16px;
+			font-family: sans-serif;
+		}
+
+		.title {
 			font-weight: bold;
+			font-family: sans-serif;
 		}
-		.body {
+
+		.output {
+			top:50px;
+			bottom: 5px;
+			display: flex;
+			flex-direction: column;
+			position: absolute;
+			overflow-y: scroll;
+			font-family: sans-serif;
+			font-size: 16px;
 			left:10px;
 			right:10px;
 		}
+
+		.royale .Label {
+			white-space: pre-wrap !important;
+		}
 	</fx:Style>
 
 	<fx:Script>
@@ -46,11 +66,29 @@ limitations under the License.
 		import testshim.RoyaleUnitTestRunner;
 		import testshim.TestResult;
 
+		//account for swf version variance in some test results due to fixed player bugs etc
+		public function getSwfVersion():uint{
+			COMPILE::SWF{
+				return this.stage.loaderInfo.bytes[3];
+
+			}
+			return 0;
+		}
+
+		public function getPlayerVersion():String{
+			COMPILE::SWF{
+				import flash.system.Capabilities;
+				return Capabilities.version;
+			}
+			return '';
+		}
 
 
 		private var _tests:Array;
 
 		public function runTests():void {
+			setPlatform();
+			RoyaleUnitTestRunner.swfVersion = getSwfVersion();
 			var label:Label;
 			var groups:Array = TestClasses.testClasses;
 			var spaces:String = PLATFORM == "JS" ? "\u00A0\u00A0\u00A0" : "   ";
@@ -158,27 +196,37 @@ limitations under the License.
 		}
 
 
-		private static function getPlatform():String {
+		private function setPlatform():void {
 			var platform:String;
+			var variant:String;
 			COMPILE::JS{
-				platform = "JS";
+				PLATFORM = "JS";
+				variant = ' ';
 			}
 			COMPILE::SWF{
-				platform = "SWF";
+				PLATFORM = "SWF";
+				variant = ' [version:' + getSwfVersion()+'] ';
 			}
-			return platform;
+
+			PLATFORM_VARIANT = getPlayerVersion() ? variant + ' [player:'+getPlayerVersion()+'] ' : variant;
 		}
 
-		public static const PLATFORM:String = getPlatform();
+		[Bindable]
+		public var PLATFORM:String;
+
+		[Bindable]
+		public var PLATFORM_VARIANT:String = '';
 		]]>
 	</fx:Script>
 	<js:beads>
 		<js:ViewDataBinding/>
 	</js:beads>
-	<js:Group id="cont" height="50" className="body">
-		<js:Label text="{PLATFORM} Cross-compiled Unit Tests" className="title" />
+	<js:Group localId="cont" height="50" className="header">
+		<js:Label text="{PLATFORM}{PLATFORM_VARIANT}Cross-compiled Unit Tests" className="title" />
 	</js:Group>
-	<js:Group id="output" height="700" y="50" className="body">
+	<js:Group localId="output"
+			  y="50"
+			  className="output">
 		<js:beads>
 			<js:VerticalFlexLayout />
 		</js:beads>
diff --git a/manualtests/UnitTests/src/main/royale/TestClasses.as b/manualtests/UnitTests/src/main/royale/TestClasses.as
index 61462dc..e112fc9 100644
--- a/manualtests/UnitTests/src/main/royale/TestClasses.as
+++ b/manualtests/UnitTests/src/main/royale/TestClasses.as
@@ -27,11 +27,13 @@ package
 		
 		public static function get testClasses():Array {
 			return [
+						LanguageTester,
 						CoreTester,
 						ReflectionTester,
 						ObservedBugsTester,
 						GithubIssuesTester,
-						NetworkTester
+						NetworkTester,
+						XMLTester
 					];
 		}
 	}
diff --git a/manualtests/UnitTests/src/main/royale/UnitTests.mxml b/manualtests/UnitTests/src/main/royale/UnitTests.mxml
index 3d088dd..57564e3 100644
--- a/manualtests/UnitTests/src/main/royale/UnitTests.mxml
+++ b/manualtests/UnitTests/src/main/royale/UnitTests.mxml
@@ -28,12 +28,23 @@
 		@namespace js "library://ns.apache.org/royale/basic";
 		js|Application {
 			background-color:#ffffff ;
+			position:absolute;
+			top:0;
+			bottom:0;
+			left:0;
+			right:0;
 		}
+
+		.view{
+			width: 100%;
+			height: 100%;
+		}
+
 	</fx:Style>
 	<js:valuesImpl>
 		<js:SimpleCSSValuesImpl />
 	</js:valuesImpl>
 	<js:initialView>
-		<local:MyInitialView />
+		<local:MyInitialView className="view" />
 	</js:initialView>
 </js:Application>
diff --git a/manualtests/UnitTests/src/main/royale/flexUnitTests/CoreTester.as b/manualtests/UnitTests/src/main/royale/flexUnitTests/CoreTester.as
index 5ce4e9a..bc94b47 100644
--- a/manualtests/UnitTests/src/main/royale/flexUnitTests/CoreTester.as
+++ b/manualtests/UnitTests/src/main/royale/flexUnitTests/CoreTester.as
@@ -18,16 +18,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 package flexUnitTests
 {
-	import flexUnitTests.core.*
-
+    import flexUnitTests.core.*
+    
     [Suite]
     [RunWith("org.flexunit.runners.Suite")]
+    /**
+     *  @royalesuppresspublicvarwarning
+     */
     public class CoreTester
     {
         public function CoreTester()
         {
             // for JS, force-link these classes in the output
-            var arr:Array = [StrandTesterTest, BinaryDataTesterTest,MD5Test];
+            var arr:Array = [StrandTesterTest, BinaryDataTesterTest, MD5Test, ArrayTesterTest];
         }
         
         // in JS, using a class as a type won't include the class in
@@ -38,7 +41,9 @@ package flexUnitTests
         // of tests?  I would think an array of tests would wokr
         // better and allow you to define order.
         public var strandTesterTest:StrandTesterTest;
-		public var binaryDataTesterTest:BinaryDataTesterTest;
-		public var md5Test:MD5Test;
+        public var binaryDataTesterTest:BinaryDataTesterTest;
+        public var md5Test:MD5Test;
+    
+        public var arrayTest:ArrayTesterTest;
     }
 }
diff --git a/manualtests/UnitTests/src/main/royale/flexUnitTests/GithubIssuesTester.as b/manualtests/UnitTests/src/main/royale/flexUnitTests/GithubIssuesTester.as
index 72b5ee1..ac51fa9 100644
--- a/manualtests/UnitTests/src/main/royale/flexUnitTests/GithubIssuesTester.as
+++ b/manualtests/UnitTests/src/main/royale/flexUnitTests/GithubIssuesTester.as
@@ -18,12 +18,24 @@
 ////////////////////////////////////////////////////////////////////////////////
 package flexUnitTests
 {
-	import flexUnitTests.github.*
-	
+    import flexUnitTests.github.*
+    
     [Suite]
     [RunWith("org.flexunit.runners.Suite")]
+    /**
+     * @royalesuppresspublicvarwarning
+     */
     public class GithubIssuesTester
     {
     
+        public function GithubIssuesTester()
+        {
+            // see notes in CoreTester
+            var arr:Array = [GithubIssues2018, GithubIssues2019];
+        }
+    
+        public var issues2018:GithubIssues2018;
+    
+        public var issues2019:GithubIssues2019;
     }
 }
diff --git a/manualtests/UnitTests/src/main/royale/flexUnitTests/ReflectionTester.as b/manualtests/UnitTests/src/main/royale/flexUnitTests/LanguageTester.as
similarity index 67%
copy from manualtests/UnitTests/src/main/royale/flexUnitTests/ReflectionTester.as
copy to manualtests/UnitTests/src/main/royale/flexUnitTests/LanguageTester.as
index 369e763..441932b 100644
--- a/manualtests/UnitTests/src/main/royale/flexUnitTests/ReflectionTester.as
+++ b/manualtests/UnitTests/src/main/royale/flexUnitTests/LanguageTester.as
@@ -18,24 +18,27 @@
 ////////////////////////////////////////////////////////////////////////////////
 package flexUnitTests
 {
-	import flexUnitTests.reflection.*;
-	
+    import flexUnitTests.language.*;
+    
     [Suite]
     [RunWith("org.flexunit.runners.Suite")]
-    public class ReflectionTester
+    /**
+     * @royalesuppresspublicvarwarning
+     */
+    public class LanguageTester
     {
-        public function ReflectionTester()
+        public function LanguageTester()
         {
             // see notes in CoreTester
-            var arr:Array = [ReflectionTesterTest, ReflectionTesterTestUseCache, ReflectionTesterTestAlias, ReflectionTesterTestDynamic];
+            var arr:Array = [LanguageTesterTestIs, LanguageTesterIntUint, LanguageTesterTestVector,LanguageTesterTestClass];
         }
         
-        public var reflectionTesterCacheTest:ReflectionTesterTestUseCache;
-        public var reflectionTesterTest:ReflectionTesterTest;
+        public var languageTestIs:LanguageTesterTestIs;
         
-        public var reflectionTesterAliasTest:ReflectionTesterTestAlias;
-	
-	
-		public var reflectionTesterDynamicTest:ReflectionTesterTestDynamic;
+        public var languageTestIntUint:LanguageTesterIntUint;
+        
+        public var languageTestVector:LanguageTesterTestVector;
+        
+        public var languageTestClass:LanguageTesterTestClass;
     }
 }
diff --git a/manualtests/UnitTests/src/main/royale/flexUnitTests/NetworkTester.as b/manualtests/UnitTests/src/main/royale/flexUnitTests/NetworkTester.as
index ef8e73b..57b4c3b 100644
--- a/manualtests/UnitTests/src/main/royale/flexUnitTests/NetworkTester.as
+++ b/manualtests/UnitTests/src/main/royale/flexUnitTests/NetworkTester.as
@@ -18,10 +18,13 @@
 ////////////////////////////////////////////////////////////////////////////////
 package flexUnitTests
 {
-	import flexUnitTests.network.*
-
+    import flexUnitTests.network.*
+    
     [Suite]
     [RunWith("org.flexunit.runners.Suite")]
+    /**
+     * @royalesuppresspublicvarwarning
+     */
     public class NetworkTester
     {
         public function NetworkTester()
@@ -37,7 +40,7 @@ package flexUnitTests
         // Is there a reason to use reflection to gather the set
         // of tests?  I would think an array of tests would wokr
         // better and allow you to define order.
-		public var amfBinaryDataTesterTest:AMFBinaryDataTesterTest;
-
+        public var amfBinaryDataTesterTest:AMFBinaryDataTesterTest;
+        
     }
 }
diff --git a/manualtests/UnitTests/src/main/royale/flexUnitTests/ObservedBugsTester.as b/manualtests/UnitTests/src/main/royale/flexUnitTests/ObservedBugsTester.as
index 11f62e3..a4540e6 100644
--- a/manualtests/UnitTests/src/main/royale/flexUnitTests/ObservedBugsTester.as
+++ b/manualtests/UnitTests/src/main/royale/flexUnitTests/ObservedBugsTester.as
@@ -18,16 +18,20 @@
 ////////////////////////////////////////////////////////////////////////////////
 package flexUnitTests
 {
-	import flexUnitTests.observedbugs.*
-	
+    import flexUnitTests.observedbugs.*
+    
     [Suite]
     [RunWith("org.flexunit.runners.Suite")]
+    /**
+     * @royalesuppresspublicvarwarning
+     */
     public class ObservedBugsTester
     {
         public function ObservedBugsTester()
         {
             var arr:Array = [ObservedBugTests];
         }
+        
         public var observedBugsTest1:ObservedBugTests;
     }
 }
diff --git a/manualtests/UnitTests/src/main/royale/flexUnitTests/ReflectionTester.as b/manualtests/UnitTests/src/main/royale/flexUnitTests/ReflectionTester.as
index 369e763..fbd8af3 100644
--- a/manualtests/UnitTests/src/main/royale/flexUnitTests/ReflectionTester.as
+++ b/manualtests/UnitTests/src/main/royale/flexUnitTests/ReflectionTester.as
@@ -18,24 +18,35 @@
 ////////////////////////////////////////////////////////////////////////////////
 package flexUnitTests
 {
-	import flexUnitTests.reflection.*;
-	
+    import flexUnitTests.reflection.*;
+    
     [Suite]
     [RunWith("org.flexunit.runners.Suite")]
+    /**
+     * @royalesuppresspublicvarwarning
+     */
     public class ReflectionTester
     {
         public function ReflectionTester()
         {
             // see notes in CoreTester
-            var arr:Array = [ReflectionTesterTest, ReflectionTesterTestUseCache, ReflectionTesterTestAlias, ReflectionTesterTestDynamic];
+            var arr:Array = [
+                ReflectionTesterTest,
+                ReflectionTesterTestUseCache,
+                ReflectionTesterTestAlias,
+                ReflectionTesterTestDynamic,
+                ReflectionTesterNativeTypes
+            ];
         }
         
         public var reflectionTesterCacheTest:ReflectionTesterTestUseCache;
         public var reflectionTesterTest:ReflectionTesterTest;
         
         public var reflectionTesterAliasTest:ReflectionTesterTestAlias;
-	
-	
-		public var reflectionTesterDynamicTest:ReflectionTesterTestDynamic;
+        
+        
+        public var reflectionTesterDynamicTest:ReflectionTesterTestDynamic;
+    
+        public var reflectionTesterNativeTypes:ReflectionTesterNativeTypes;
     }
 }
diff --git a/manualtests/UnitTests/src/main/royale/flexUnitTests/NetworkTester.as b/manualtests/UnitTests/src/main/royale/flexUnitTests/XMLTester.as
similarity index 80%
copy from manualtests/UnitTests/src/main/royale/flexUnitTests/NetworkTester.as
copy to manualtests/UnitTests/src/main/royale/flexUnitTests/XMLTester.as
index ef8e73b..4c1695e 100644
--- a/manualtests/UnitTests/src/main/royale/flexUnitTests/NetworkTester.as
+++ b/manualtests/UnitTests/src/main/royale/flexUnitTests/XMLTester.as
@@ -18,16 +18,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 package flexUnitTests
 {
-	import flexUnitTests.network.*
-
+    import flexUnitTests.xml.*
+    
     [Suite]
     [RunWith("org.flexunit.runners.Suite")]
-    public class NetworkTester
+    /**
+     * @royalesuppresspublicvarwarning
+     */
+    public class XMLTester
     {
-        public function NetworkTester()
+        public function XMLTester()
         {
             // for JS, force-link these classes in the output
-            var arr:Array = [AMFBinaryDataTesterTest];
+            var arr:Array = [XMLTesterGeneralTest, XMLTesterStringifyTest];
         }
         
         // in JS, using a class as a type won't include the class in
@@ -37,7 +40,10 @@ package flexUnitTests
         // Is there a reason to use reflection to gather the set
         // of tests?  I would think an array of tests would wokr
         // better and allow you to define order.
-		public var amfBinaryDataTesterTest:AMFBinaryDataTesterTest;
-
+        
+        public var xmlTesterGeneralTest:XMLTesterGeneralTest;
+        
+        public var xmlTesterStringifyTest:XMLTesterStringifyTest;
+        
     }
 }
diff --git a/manualtests/UnitTests/src/main/royale/flexUnitTests/core/ArrayTesterTest.as b/manualtests/UnitTests/src/main/royale/flexUnitTests/core/ArrayTesterTest.as
new file mode 100644
index 0000000..d038de6
--- /dev/null
+++ b/manualtests/UnitTests/src/main/royale/flexUnitTests/core/ArrayTesterTest.as
@@ -0,0 +1,163 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 flexUnitTests.core
+{
+    
+    
+    import flexunit.framework.Assert;
+    import flexUnitTests.core.support.TestVO;
+    
+    /**
+     *  @royalesuppresspublicvarwarning
+     */
+    public class ArrayTesterTest
+    {
+        
+        [Before]
+        public function setUp():void
+        {
+            /*items1 = [
+                new TestVO('aB', 0, 'zz'),
+                new TestVO('aA', 0, 'aa'),
+                new TestVO('aC', 1, 'zz'),
+                new TestVO('aa', 1, 'aa'),
+                new TestVO('ab', -1, 'zz'),
+                new TestVO('ac', -1, 'aa')
+            ];
+            
+            items2 =
+            
+            field1s = [];
+            var i:uint=0, l:uint=items.length;
+            for(;i<l;i++) {
+                field1s.push(items[i].field1);
+            }
+            
+            values = [23,-93,-59,-55,41,-29,69,11,33,-71,83,87,27,-39,70,-50,-56,-61,17,-35,-60,-86,-78,-83,-10];
+*/        }
+        
+        [After]
+        public function tearDown():void
+        {
+        }
+        
+        [BeforeClass]
+        public static function setUpBeforeClass():void
+        {
+        }
+        
+        [AfterClass]
+        public static function tearDownAfterClass():void
+        {
+        }
+        
+        public var items1:Array;
+    
+        public var items2:Array;
+        
+        public var field1s:Array;
+    
+        public var values:Array;
+        
+        
+        private function _sort(arr:Array,args:Array):void{
+            COMPILE::SWF{
+                arr.sort.apply(arr,args);
+            }
+            COMPILE::JS{
+                import org.apache.royale.utils.Language;
+                args.unshift(arr);
+                Language.sort.apply(null, args);
+            }
+        }
+    
+        [Test]
+        public function testSort():void
+        {
+            Assert.assertTrue("Parked, needs more work", true);
+            
+            /*import testshim.RoyaleUnitTestRunner;
+            /!*Assert.assertEquals('unexpected starting state',
+                    '23,-93,-59,-55,41,-29,69,11,33,-71,83,87,27,-39,70,-50,-56,-61,17,-35,-60,-86,-78,-83,-10',
+                    values.toString());*!/
+            Assert.assertEquals('unexpected starting state',
+                'aB,aA,aC,aa,ab,ac,zA,ZA,zA,ZA,zA,zA,AA,AA',
+                field1s.toString());
+            
+            field1s.sort();
+            Assert.assertEquals('unexpected starting state',
+                    'AA,AA,ZA,ZA,aA,aB,aC,aa,ab,ac,zA,zA,zA,zA',
+                    field1s.toString());
+    
+            RoyaleUnitTestRunner.consoleOut('field1s ' + field1s.toString());
+    
+            _sort(field1s, [Array.CASEINSENSITIVE]);
+    
+            Assert.assertEquals('unexpected starting state',
+                    'aa,AA,aA,AA,ab,aB,ac,aC,ZA,ZA,zA,zA,zA,zA',
+                    field1s.toString());
+    
+            _sort(field1s, [Array.DESCENDING]);
+    
+            Assert.assertEquals('unexpected starting state',
+                    'zA,zA,zA,zA,ac,ab,aa,aC,aB,aA,ZA,ZA,AA,AA',
+                    field1s.toString());
+            
+           // field1s.sort(Array.CASEINSENSITIVE);
+    
+            RoyaleUnitTestRunner.consoleOut('field1s ' + field1s.toString());
+            _sort(field1s, [Array.DESCENDING|Array.CASEINSENSITIVE]);
+    
+            Assert.assertEquals('unexpected starting state',
+                    'zA,zA,zA,zA,ZA,ZA,ac,aC,ab,aB,AA,aA,aa,AA',
+                    field1s.toString());
+            RoyaleUnitTestRunner.consoleOut('field1s ' + field1s.toString());*/
+            
+        }
+        
+        
+        [Test]
+        public function testSortOn():void
+        {
+            Assert.assertTrue("Parked, needs more work", true);
+            
+           /* Assert.assertEquals('unexpected starting state', 
+                    'TestVO [aB]#0 [zz],TestVO [aA]#0 [aa],TestVO [aC]#1 [zz],TestVO [aa]#1 [aa],TestVO [ab]#-1 [zz],TestVO [ac]#-1 [aa],TestVO [zA]#0 [bb],TestVO [ZA]#0 [aa],TestVO [zA]#1 [bb],TestVO [ZA]#1 [aa],TestVO [zA]#-1 [bb],TestVO [zA]#-1 [aa],TestVO [AA]#0 [aa],TestVO [AA]#0 [zz]',
+                    items.toString());
+    
+            import testshim.RoyaleUnitTestRunner;
+    
+            RoyaleUnitTestRunner.consoleOut('items ' + items.toString());
+    
+
+            
+            items.sortOn('field1',0);
+            Assert.assertEquals('unexpected sortOn result',
+                    'TestVO [AA]#0 [aa],TestVO [AA]#0 [zz],TestVO [ZA]#0 [aa],TestVO [ZA]#-1 [aa],TestVO [ZA]#1 [aa],TestVO [aA]#0 [zz],TestVO [aA]#-1 [zz],TestVO [aA]#-1 [aa],TestVO [aA]#0 [aa],TestVO [aA]#1 [aa],TestVO [aA]#1 [zz],TestVO [zA]#-1 [bb],TestVO [zA]#0 [bb],TestVO [zA]#1 [bb]',
+                    items.toString());
+            
+            
+    
+            RoyaleUnitTestRunner.consoleOut('items ' + items.toString());*/
+        
+        }
+        
+        
+    }
+}
diff --git a/manualtests/UnitTests/src/main/royale/flexUnitTests/core/BinaryDataTesterTest.as b/manualtests/UnitTests/src/main/royale/flexUnitTests/core/BinaryDataTesterTest.as
index b6613b7..867a103 100644
--- a/manualtests/UnitTests/src/main/royale/flexUnitTests/core/BinaryDataTesterTest.as
+++ b/manualtests/UnitTests/src/main/royale/flexUnitTests/core/BinaryDataTesterTest.as
@@ -18,605 +18,617 @@
 ////////////////////////////////////////////////////////////////////////////////
 package flexUnitTests.core
 {
-
-
+    
+    
     import org.apache.royale.utils.Endian;
+    
     import flexunit.framework.Assert;
+    
     import org.apache.royale.utils.BinaryData
-
-
+    
+    
     public class BinaryDataTesterTest
-	{
-
-		[Before]
-		public function setUp():void {
-		}
-
-		[After]
-		public function tearDown():void {
-		}
-
-		[BeforeClass]
-		public static function setUpBeforeClass():void {
-		}
-
-		[AfterClass]
-		public static function tearDownAfterClass():void {
-		}
-
-
-		//util check functions
-		private static function bytesMatchExpectedData(bd:BinaryData,expected:Array,offset:int=0):Boolean{
-			var len:uint = expected.length;
-			var end:uint=offset+len;
-			for (var i:int=offset;i<end;i++) {
-				var check:uint = bd.readByteAt(i);
-				if (expected[i-offset]!=check) {
-					// trace('failed at ',i,expected[i-offset],check);
-					return false;
-				}
-			}
-			return true;
-		}
-
-		private static function reversedBytesMatch(bd1:BinaryData,bd2:BinaryData,len:uint,offset:int=0):Boolean{
-			var end:uint=offset+len;
-			for (var i:int=offset;i<end;i++) {
-				if (bd1.readByteAt(i) != bd2.readByteAt(end-1-i)) return false;
-			}
-			return true;
-
-		}
-
-
-		[Test]
-		public function testBasicPositionAndLength():void
-		{
-			var ba:BinaryData = new BinaryData();
-
-			Assert.assertEquals("new Instance, position", 0, ba.position);
-			Assert.assertEquals("new Instance, length", 0, ba.length);
-
-			ba.position=100;
-			Assert.assertEquals("position change, position", 100, ba.position);
-			Assert.assertEquals("position change, length", 0, ba.length);
-			Assert.assertEquals("position change, length", 0, ba.bytesAvailable);
-
-			ba.length=100;
-			Assert.assertEquals("length change, position", 100, ba.position);
-			Assert.assertEquals("length change, length", 100, ba.length);
-
-			ba.length=50;
-			Assert.assertEquals("length change, position", 50, ba.position);
-			Assert.assertEquals("length change, length", 50, ba.length);
-
-
-		}
-
-		[Test]
-		public function testAdvancedPositionAndLength():void
-		{
-			var ba:BinaryData = new BinaryData();
-
-			ba.position=100;
-			ba.length=100;
-
-			ba.writeByteAt(49,255);
-			Assert.assertEquals("writeByteAt does not affect position",100, ba.position);
-			Assert.assertEquals("writeByteAt (internal) does not affect length",100, ba.length);
-
-			ba.readByteAt(48);
-			Assert.assertEquals("readByteAt does not affect position",100, ba.position);
-			Assert.assertEquals("readByteAt does not affect length",100, ba.length);
-
-			ba.writeByteAt(199,255);
-			Assert.assertEquals("writeByteAt (beyond length) does affect length",200, ba.length);
-			Assert.assertEquals("writeByteAt (beyond length) does not affect position",100, ba.position);
-
-			Assert.assertStrictlyEquals("out of range byte read request",0 ,ba.readByteAt(205));
-
-		}
-
-
-		[Test]
-		public function testUTFWritePosition():void
-		{
-			var ba:BinaryData = new BinaryData();
-			ba.writeUTF('This is a test');
-			//writeUTF
-			Assert.assertEquals("basic post-writeUTF position", 16, ba.position);
-			ba=new BinaryData();
-			ba.writeUTFBytes('This is a test');
-			//writeUTFBytes
-			Assert.assertEquals("basic post-writeUTFBytes position", 14, ba.position);
-
-			//overlapping
-			ba.position=5;
-			ba.writeUTFBytes('This is a test');
-			Assert.assertEquals("Advanced post-writeUTFBytes position (overlap)", 19, ba.position);
-
-		}
-
-		[Test]
-		public function testBooleanRoundTripping():void
-		{
-			var ba:BinaryData = new BinaryData();
-			ba.writeBoolean(true);
-			ba.writeBoolean(false);
-			ba.position = 0;
-			Assert.assertTrue(ba.readBoolean());
-			Assert.assertFalse(ba.readBoolean());
-		}
-
-		[Test]
-		public function testByteRoundTripping():void
-		{
-			var ba:BinaryData = new BinaryData();
-			ba.writeByte(255);
-			ba.writeByte(256);
-			ba.writeByte(-256);
-			ba.writeByte(-257);
-			ba.writeByte(-128);
-			ba.writeByte(128);
-			ba.writeByte(127);
-			ba.writeByte(-50);
-			ba.writeByte(50);
-			ba.position = 0;
-
-
-			Assert.assertEquals("Error testing post writeByte/readByte round-tripping", -1, ba.readByte());
-			Assert.assertEquals("Error testing post writeByte/readByte round-tripping", 0, ba.readByte());
-			Assert.assertEquals("Error testing post writeByte/readByte round-tripping", 0, ba.readByte());
-			Assert.assertEquals("Error testing post writeByte/readByte round-tripping", -1, ba.readByte());
-			Assert.assertEquals("Error testing post writeByte/readByte round-tripping", -128, ba.readByte());
-			Assert.assertEquals("Error testing post writeByte/readByte round-tripping", -128, ba.readByte());
-			Assert.assertEquals("Error testing post writeByte/readByte round-tripping", 127, ba.readByte());
-			Assert.assertEquals("Error testing post writeByte/readByte round-tripping", -50, ba.readByte());
-			Assert.assertEquals("Error testing post writeByte/readByte round-tripping", 50, ba.readByte());
-		}
-
-
-		[Test]
-		public function testUnsignedByteRoundTripping():void
-		{
-			var ba:BinaryData = new BinaryData();
-			ba.writeByte(255);
-			ba.writeByte(256);
-			ba.writeByte(-256);
-			ba.writeByte(-257);
-			ba.writeByte(-128);
-			ba.writeByte(128);
-			ba.writeByte(127);
-			ba.writeByte(-50);
-			ba.writeByte(50);
-			ba.position = 0;
-			//check read values
-
-			Assert.assertEquals("Error testing post writeByte/readUnsignedByte round-tripping", 255, ba.readUnsignedByte());
-			Assert.assertEquals("Error testing post writeByte/readUnsignedByte round-tripping", 0, ba.readUnsignedByte());
-			Assert.assertEquals("Error testing post writeByte/readUnsignedByte round-tripping", 0, ba.readUnsignedByte());
-			Assert.assertEquals("Error testing post writeByte/readUnsignedByte round-tripping", 255, ba.readUnsignedByte());
-			Assert.assertEquals("Error testing post writeByte/readUnsignedByte round-tripping", 128, ba.readUnsignedByte());
-			Assert.assertEquals("Error testing post writeByte/readUnsignedByte round-tripping", 128, ba.readUnsignedByte());
-			Assert.assertEquals("Error testing post writeByte/readUnsignedByte round-tripping", 127, ba.readUnsignedByte());
-			Assert.assertEquals("Error testing post writeByte/readUnsignedByte round-tripping", 206, ba.readUnsignedByte());
-			Assert.assertEquals("Error testing post writeByte/readUnsignedByte round-tripping", 50, ba.readUnsignedByte());
-		}
-
-
-		[Test]
-		public function testBasicEndian():void
-		{
-
-			var systemEndian:String = Endian.systemEndian;
-			//check we have a decisive systemEndian detection
-			Assert.assertNotNull(systemEndian );
-
-
-			var ba:BinaryData = new BinaryData();
-			var defaultEndian:String = ba.endian;
-
-			var alternateEndian:String = (defaultEndian == Endian.BIG_ENDIAN) ? Endian.LITTLE_ENDIAN : Endian.BIG_ENDIAN;
-			var expected:Object ={};
-			expected[Endian.BIG_ENDIAN] = 218038271;
-			expected[Endian.LITTLE_ENDIAN] = 4294966796;
-			var bytes:Array = [12, 254, 255, 255];
-			for each(var byte:uint in bytes) ba.writeByte(byte);
-			ba.position = 0;
-
-			Assert.assertEquals("testing endian:"+defaultEndian, expected[defaultEndian] , ba.readUnsignedInt());
-
-			ba.position = 0;
-			ba.endian = alternateEndian;
-			var result:uint =  ba.readUnsignedInt();
-
-			Assert.assertEquals("testing endian:"+alternateEndian, expected[alternateEndian], result);
-
-			ba.position = 0;
-			ba.endian = defaultEndian;
-			Assert.assertEquals("testing endian:"+defaultEndian, int(expected[defaultEndian]), ba.readInt());
-
-			ba.position = 0;
-			ba.endian = alternateEndian;
-			Assert.assertEquals("testing endian:"+alternateEndian, int(expected[alternateEndian]), ba.readInt());
-
-			var leBA:BinaryData = new BinaryData();
-			leBA.endian = Endian.LITTLE_ENDIAN;
-			var beBA:BinaryData = new BinaryData();
-			beBA.endian = Endian.BIG_ENDIAN;
-			//int writing
-			beBA.writeInt(-500);
-			leBA.writeInt(-500);
-			//check they represent reversed byte sequence
-			Assert.assertTrue(reversedBytesMatch(beBA,leBA,4));
-			beBA.position=0;
-			leBA.position=0;
-			//check they each read back to the same uint value
-			Assert.assertEquals('big endian',4294966796,beBA.readUnsignedInt());
-			Assert.assertEquals('little endian',4294966796,leBA.readUnsignedInt());
-
-			beBA.position=0;
-			leBA.position=0;
-			//uint writing
-			beBA.writeUnsignedInt(4294966796);
-			leBA.writeUnsignedInt(4294966796);
-			//check they represent reversed byte sequence
-			Assert.assertTrue(reversedBytesMatch(beBA,leBA,4));
-			beBA.position=0;
-			leBA.position=0;
-			//check they each read back to the same uint value
-			Assert.assertEquals('big endian',4294966796,beBA.readUnsignedInt());
-			Assert.assertEquals('little endian',4294966796,leBA.readUnsignedInt());
-
-
-			beBA.position=0;
-			leBA.position=0;
-
-			//check they each read back to the same int value
-			Assert.assertEquals('big endian',-500,beBA.readInt());
-			Assert.assertEquals('little endian',-500,leBA.readInt());
-
-
-			beBA.position=0;
-			leBA.position=0;
-
-			//short writing
-			beBA.writeShort(-500);
-			leBA.writeShort(-500);
-			//check they represent reversed byte sequence
-			Assert.assertTrue(reversedBytesMatch(beBA,leBA,2));
-			beBA.position=0;
-			leBA.position=0;
-			//check they each read back to the same uint value
-			Assert.assertEquals('big endian',65036,beBA.readUnsignedShort());
-			Assert.assertEquals('little endian',65036,leBA.readUnsignedShort());
-
-
-			beBA.position=0;
-			leBA.position=0;
-
-			//check they each read back to the same int value
-			Assert.assertEquals('big endian',-500,beBA.readShort());
-			Assert.assertEquals('little endian',-500,leBA.readShort());
-
-		}
-
-
-		[Test]
-		public function testUTFRoundtripping():void
-		{
-
-			//test big-endian round-tripping
-			var ba:BinaryData = new BinaryData();
-			ba.endian = Endian.BIG_ENDIAN;
-			ba.writeUTF('This is a test');
-			//writeUTF
-			Assert.assertEquals("basic post-writeUTF position", 16, ba.position);
-			ba.position = 0;
-			Assert.assertEquals("utf big endian round-tripping", 'This is a test', ba.readUTF());
-
-			ba = new BinaryData();
-			//test little-endian round-tripping
-			ba.endian = Endian.LITTLE_ENDIAN;
-			ba.writeUTF('This is a test');
-			//writeUTF
-			Assert.assertEquals("basic post-writeUTF position", 16, ba.position);
-			ba.position = 0;
-			Assert.assertEquals("utf big endian round-tripping", 'This is a test', ba.readUTF());
-
-		}
-
-
-		[Test]
-		public function testShortRoundTripping():void
-		{
-			var ba:BinaryData = new BinaryData();
-			//test LITTLE_ENDIAN round-tripping
-			ba.endian = Endian.LITTLE_ENDIAN;
-			ba.writeShort(255);
-			ba.writeShort(-50);
-			ba.writeShort(50);
-			ba.position = 0;
-
-			Assert.assertEquals("Error testing post writeShort/readShort round-tripping", 6, ba.length);
-			Assert.assertEquals("Error testing post writeShort/readShort round-tripping", 255, ba.readShort());
-			Assert.assertEquals("Error testing post writeShort/readShort round-tripping", -50, ba.readShort());
-			Assert.assertEquals("Error testing post writeShort/readShort round-tripping", 50, ba.readShort());
-
-			//test BIG_ENDIAN round-tripping
-
-			ba.position = 0;
-			ba.endian = Endian.BIG_ENDIAN ;
-			ba.writeShort(255);
-			ba.writeShort(-50);
-			ba.writeShort(50);
-			ba.position = 0;
-
-			Assert.assertEquals("Error testing post writeShort/readShort round-tripping", 6, ba.length);
-			Assert.assertEquals("Error testing post writeShort/readShort round-tripping", 255, ba.readShort());
-			Assert.assertEquals("Error testing post writeShort/readShort round-tripping", -50, ba.readShort());
-			Assert.assertEquals("Error testing post writeShort/readShort round-tripping", 50, ba.readShort());
-		}
-
-
-		[Test]
-		public function testUnsignedShortRoundTripping():void
-		{
-			var ba:BinaryData = new BinaryData();
-			//test LITTLE_ENDIAN round-tripping
-			ba.endian = Endian.LITTLE_ENDIAN;
-			ba.writeShort(255);
-			ba.writeShort(-50);
-			ba.writeShort(50);
-			ba.position = 0;
-
-			Assert.assertEquals("Error testing post unsigned writeShort/readShort round-tripping", 6, ba.length);
-			Assert.assertEquals("Error testing post unsigned writeShort/readShort round-tripping", 255, ba.readUnsignedShort());
-			Assert.assertEquals("Error testing post unsigned writeShort/readShort round-tripping", 65486, ba.readUnsignedShort());
-			Assert.assertEquals("Error testing post unsigned writeShort/readShort round-tripping", 50, ba.readUnsignedShort());
-
-			//test BIG_ENDIAN round-tripping
-
-			ba.position = 0;
-			ba.endian = Endian.BIG_ENDIAN ;
-			ba.writeShort(255);
-			ba.writeShort(-50);
-			ba.writeShort(50);
-			ba.position = 0;
-
-			Assert.assertEquals("Error testing post unsigned writeShort/readShort round-tripping", 6, ba.length);
-			Assert.assertEquals("Error testing post unsigned writeShort/readShort round-tripping", 255, ba.readUnsignedShort());
-			Assert.assertEquals("Error testing post unsigned writeShort/readShort round-tripping", 65486, ba.readUnsignedShort());
-			Assert.assertEquals("Error testing post unsigned writeShort/readShort round-tripping", 50, ba.readUnsignedShort());
-		}
-
-		[Test]
-		public function testIntRoundTripping():void
-		{
-			var ba:BinaryData = new BinaryData();
-			//test LITTLE_ENDIAN round-tripping
-			ba.endian = Endian.LITTLE_ENDIAN;
-			ba.writeInt(65536);
-			ba.writeInt(-50);
-			ba.writeInt(50);
-			ba.position = 0;
-
-			Assert.assertEquals("Error testing post writeInt/readInt round-tripping", 12, ba.length);
-			Assert.assertEquals("Error testing post writeInt/readInt round-tripping", 65536, ba.readInt());
-			Assert.assertEquals("Error testing post writeInt/readInt round-tripping", -50, ba.readInt());
-			Assert.assertEquals("Error testing post writeInt/readInt round-tripping", 50, ba.readInt());
-
-			//test BIG_ENDIAN round-tripping
-
-			ba.position = 0;
-			ba.endian = Endian.BIG_ENDIAN ;
-			ba.writeInt(65536);
-			ba.writeInt(-50);
-			ba.writeInt(50);
-			ba.position = 0;
-
-			Assert.assertEquals("Error testing post writeInt/readInt round-tripping", 12, ba.length);
-			Assert.assertEquals("Error testing post writeInt/readInt round-tripping", 65536, ba.readInt());
-			Assert.assertEquals("Error testing post writeInt/readInt round-tripping", -50, ba.readInt());
-			Assert.assertEquals("Error testing post writeInt/readInt round-tripping", 50, ba.readInt());
-		}
-
-
-		[Test]
-		public function testUnsignedIntRoundTripping():void
-		{
-			var ba:BinaryData = new BinaryData();
-			//test LITTLE_ENDIAN round-tripping
-			ba.endian = Endian.LITTLE_ENDIAN;
-			ba.writeUnsignedInt(65536);
-			ba.writeUnsignedInt(-50);
-			ba.writeUnsignedInt(50);
-			ba.position = 0;
-
-			Assert.assertEquals("Error testing post writeInt/readInt round-tripping", 12, ba.length);
-			Assert.assertEquals("Error testing post writeInt/readInt round-tripping",65536, ba.readUnsignedInt());
-			Assert.assertEquals("Error testing post writeInt/readInt round-tripping", 4294967246, ba.readUnsignedInt());
-			Assert.assertEquals("Error testing post writeInt/readInt round-tripping", 50, ba.readUnsignedInt());
-
-			//test BIG_ENDIAN round-tripping
-
-			ba.position = 0;
-			ba.endian = Endian.BIG_ENDIAN ;
-			ba.writeUnsignedInt(65536);
-			ba.writeUnsignedInt(-50);
-			ba.writeUnsignedInt(50);
-			ba.position = 0;
-
-			Assert.assertEquals("Error testing post writeInt/readInt round-tripping", 12, ba.length);
-			Assert.assertEquals("Error testing post writeInt/readInt round-tripping",65536, ba.readUnsignedInt());
-			Assert.assertEquals("Error testing post writeInt/readInt round-tripping", 4294967246, ba.readUnsignedInt());
-			Assert.assertEquals("Error testing post writeInt/readInt round-tripping", 50, ba.readUnsignedInt());
-		}
-
-		[Test]
-		public function testFloatRoundTripping():void
-		{
-			var ble:BinaryData = new BinaryData();
-			//test LITTLE_ENDIAN round-tripping
-			ble.endian = Endian.LITTLE_ENDIAN;
-			ble.writeFloat(86.54);
-
-
-			Assert.assertEquals("Error testing post writeFloat/readFloat round-tripping", 4, ble.length);
-			Assert.assertEquals("Error testing post writeFloat/readFloat round-tripping", 4, ble.position);
-			//check bytes to account for precision loss between double and float comparisons
-			Assert.assertTrue("Error testing post writeFloat/readFloat round-tripping", bytesMatchExpectedData(ble,[123,20,173,66]));
-
-			var bbe:BinaryData = new BinaryData();
-			//test BIG_ENDIAN round-tripping
-			bbe.endian = Endian.BIG_ENDIAN;
-			bbe.writeFloat(86.54);
-
-
-			Assert.assertEquals("Error testing post writeFloat/readFloat round-tripping", 4, bbe.length);
-			Assert.assertEquals("Error testing post writeFloat/readFloat round-tripping", 4, bbe.position);
-			//check bytes to account for precision loss between double and float comparisons
-			Assert.assertTrue("Error testing post writeFloat/readFloat round-tripping", bytesMatchExpectedData(bbe,[66,173,20,123]));
-
-
-		}
-
-
-		[Test]
-		public function testDoubleRoundTripping():void
-		{
-
-			var ble:BinaryData = new BinaryData();
-			//test LITTLE_ENDIAN round-tripping
-			ble.endian = Endian.LITTLE_ENDIAN;
-			ble.writeDouble(86.54);
-
-
-			Assert.assertEquals("Error testing post writeDouble/readDouble round-tripping", 8, ble.length);
-			Assert.assertEquals("Error testing post writeDouble/readDouble round-tripping", 8, ble.position);
-
-			//check bytes
-			Assert.assertTrue("Error testing post writeDouble/readDouble round-tripping", bytesMatchExpectedData(ble,[195,245,40,92,143,162,85,64]));
-
-			var bbe:BinaryData = new BinaryData();
-			//test BIG_ENDIAN round-tripping
-			bbe.endian = Endian.BIG_ENDIAN;
-			bbe.writeDouble(86.54);
-
-
-			Assert.assertEquals("Error testing post writeDouble/readDouble round-tripping", 8, bbe.length);
-			Assert.assertEquals("Error testing post writeDouble/readDouble round-tripping", 8, bbe.position);
-			//check bytes
-
-			Assert.assertTrue("Error testing post writeDouble/readDouble round-tripping", bytesMatchExpectedData(bbe,[64,85,162,143,92,40,245,195]));
-
-
-			ble.position = 0;
-			bbe.position = 0;
-			Assert.assertEquals("Error testing post writeDouble/readDouble round-tripping", 86.54, bbe.readDouble());
-			Assert.assertEquals("Error testing post writeDouble/readDouble round-tripping", 86.54, ble.readDouble());
-
-			Assert.assertEquals("Error testing post writeDouble/readDouble round-tripping", 8, bbe.position);
-			Assert.assertEquals("Error testing post writeDouble/readDouble round-tripping", 8, ble.position);
-
-		}
-
-
-
-		[Test]
-		public function testWriteBinaryData():void
-		{
-			var ba:BinaryData = new BinaryData();
-			for (var i:int=0;i<50;i++) ba.writeByte(i);
-
-
-			var newBa:BinaryData = new BinaryData();
-			newBa.writeBinaryData(ba);
-
-			Assert.assertEquals("BinaryData writeBinaryData: length", 50, newBa.length);
-			Assert.assertEquals("BinaryData writeBinaryData: position", 50, newBa.position);
-
-			for (i=0;i<50;i++) {
-				Assert.assertEquals("BinaryData writeBinaryData: content check", i, newBa.array[i]);
-			}
-
-
-
-		}
-
-		[Test]
-		public function testReadBinaryData():void
-		{
-			var ba:BinaryData = new BinaryData();
-			for (var i:int=0;i<50;i++) ba.writeByte(i);
-			ba.position=0;
-			var newBa:BinaryData = new BinaryData();
-
-			ba.readBinaryData(newBa,5,10);
-			Assert.assertEquals("BinaryData readBinaryData: position", 10, ba.position);
-			Assert.assertEquals("BinaryData readBinaryData: length", 15, newBa.length);
-			Assert.assertEquals("BinaryData readBinaryData: position", 0, newBa.position);
-			var expected:Array = [0,0,0,0,0,0,1,2,3,4,5,6,7,8,9];
-			for (i=0;i<15;i++) {
-				Assert.assertEquals("BinaryData readBinaryData: content check", expected[i], newBa.array[i]);
-			}
-			newBa.position = 15;
-			ba.readBinaryData(newBa,5,10);
-			expected = [0,0,0,0,0,10,11,12,13,14,15,16,17,18,19];
-			for (i=0;i<15;i++) {
-				Assert.assertEquals("BinaryData readBinaryData: content check", expected[i], newBa.array[i]);
-			}
-			Assert.assertEquals("BinaryData readBinaryData: length", 15, newBa.length);
-			Assert.assertEquals("BinaryData readBinaryData: position", 15, newBa.position);
-		}
-
-		[Test]
-		public function testReadOddBytes():void
-		{
-			var ba:BinaryData = new BinaryData();
-			for (var i:int=0;i<50;i++) ba.writeByte(i);
-			ba.endian = Endian.BIG_ENDIAN;
-			ba.position=0;
-			Assert.assertEquals("BinaryData readByte: should be 0", 0, ba.readByte());
-			Assert.assertEquals("BinaryData readShort: should be 258", 258, ba.readShort());
-			Assert.assertEquals("BinaryData readInt: should be 50595078", 50595078, ba.readInt());
-			ba.endian = Endian.LITTLE_ENDIAN;
-			ba.position=0;
-			Assert.assertEquals("BinaryData readByte: should be 0", 0, ba.readByte());
-			Assert.assertEquals("BinaryData readShort: should be 513", 513, ba.readShort());
-			Assert.assertEquals("BinaryData readInt: should be 100992003", 100992003, ba.readInt());
-
-			ba = new BinaryData();
-			ba.writeByte(25);
-			ba.writeShort(65535);
-			ba.writeUnsignedInt(4294967295);
-			ba.position = 0;
-			Assert.assertEquals("BinaryData readByte: should be 25", 25, ba.readByte());
-			Assert.assertEquals("BinaryData readUnsignedShort: should be 65535", 65535, ba.readUnsignedShort());
-			Assert.assertEquals("BinaryData readInt: should be 4294967295", 4294967295, ba.readUnsignedInt());
-
-			ba = new BinaryData();
-			ba.writeByte(-25);
-			ba.writeShort(-1029);
-			ba.writeInt(-131072);
-			ba.writeFloat(12345.2);
-			ba.writeDouble(3.1415927410);
-			ba.position = 0;
-			Assert.assertEquals("BinaryData readByte: should be -25", -25, ba.readByte());
-			Assert.assertEquals("BinaryData readShort: should be -1029", -1029, ba.readShort());
-			Assert.assertEquals("BinaryData readInt: should be -131072", -131072, ba.readInt());
-			Assert.assertEquals("BinaryData readFloat: should be 12345.2", 12345.2, Math.round(ba.readFloat() * 100)/100);
-			Assert.assertEquals("BinaryData readDouble: should be 3.1415927410", 3.1415927410, ba.readDouble());
-			ba = new BinaryData()
-			ba.writeFloat(12345.2);
-			ba.position = 0;
-			Assert.assertEquals("BinaryData readFloat: should be 12345.2", 12345.2, Math.round(ba.readFloat() * 100)/100);
-			ba.position = 0;
-			ba.writeDouble(3.1415927410);
-			ba.position = 0;
-			Assert.assertEquals("BinaryData readDouble: should be 3.1415927410", 3.1415927410, ba.readDouble());
-		}
-
-
-	}
+    {
+        
+        [Before]
+        public function setUp():void
+        {
+        }
+        
+        [After]
+        public function tearDown():void
+        {
+        }
+        
+        [BeforeClass]
+        public static function setUpBeforeClass():void
+        {
+        }
+        
+        [AfterClass]
+        public static function tearDownAfterClass():void
+        {
+        }
+        
+        
+        //util check functions
+        private static function bytesMatchExpectedData(bd:BinaryData, expected:Array, offset:int = 0):Boolean
+        {
+            var len:uint = expected.length;
+            var end:uint = offset + len;
+            for (var i:int = offset; i < end; i++)
+            {
+                var check:uint = bd.readByteAt(i);
+                if (expected[i - offset] != check)
+                {
+                    // trace('failed at ',i,expected[i-offset],check);
+                    return false;
+                }
+            }
+            return true;
+        }
+        
+        private static function reversedBytesMatch(bd1:BinaryData, bd2:BinaryData, len:uint, offset:int = 0):Boolean
+        {
+            var end:uint = offset + len;
+            for (var i:int = offset; i < end; i++)
+            {
+                if (bd1.readByteAt(i) != bd2.readByteAt(end - 1 - i)) return false;
+            }
+            return true;
+            
+        }
+        
+        
+        [Test]
+        public function testBasicPositionAndLength():void
+        {
+            var ba:BinaryData = new BinaryData();
+            
+            Assert.assertEquals("new Instance, position", 0, ba.position);
+            Assert.assertEquals("new Instance, length", 0, ba.length);
+            
+            ba.position = 100;
+            Assert.assertEquals("position change, position", 100, ba.position);
+            Assert.assertEquals("position change, length", 0, ba.length);
+            Assert.assertEquals("position change, length", 0, ba.bytesAvailable);
+            
+            ba.length = 100;
+            Assert.assertEquals("length change, position", 100, ba.position);
+            Assert.assertEquals("length change, length", 100, ba.length);
+            
+            ba.length = 50;
+            Assert.assertEquals("length change, position", 50, ba.position);
+            Assert.assertEquals("length change, length", 50, ba.length);
+            
+            
+        }
+        
+        [Test]
+        public function testAdvancedPositionAndLength():void
+        {
+            var ba:BinaryData = new BinaryData();
+            
+            ba.position = 100;
+            ba.length = 100;
+            
+            ba.writeByteAt(49, 255);
+            Assert.assertEquals("writeByteAt does not affect position", 100, ba.position);
+            Assert.assertEquals("writeByteAt (internal) does not affect length", 100, ba.length);
+            
+            ba.readByteAt(48);
+            Assert.assertEquals("readByteAt does not affect position", 100, ba.position);
+            Assert.assertEquals("readByteAt does not affect length", 100, ba.length);
+            
+            ba.writeByteAt(199, 255);
+            Assert.assertEquals("writeByteAt (beyond length) does affect length", 200, ba.length);
+            Assert.assertEquals("writeByteAt (beyond length) does not affect position", 100, ba.position);
+            
+            Assert.assertStrictlyEquals("out of range byte read request", 0, ba.readByteAt(205));
+            
+        }
+        
+        
+        [Test]
+        public function testUTFWritePosition():void
+        {
+            var ba:BinaryData = new BinaryData();
+            ba.writeUTF('This is a test');
+            //writeUTF
+            Assert.assertEquals("basic post-writeUTF position", 16, ba.position);
+            ba = new BinaryData();
+            ba.writeUTFBytes('This is a test');
+            //writeUTFBytes
+            Assert.assertEquals("basic post-writeUTFBytes position", 14, ba.position);
+            
+            //overlapping
+            ba.position = 5;
+            ba.writeUTFBytes('This is a test');
+            Assert.assertEquals("Advanced post-writeUTFBytes position (overlap)", 19, ba.position);
+            
+        }
+        
+        [Test]
+        public function testBooleanRoundTripping():void
+        {
+            var ba:BinaryData = new BinaryData();
+            ba.writeBoolean(true);
+            ba.writeBoolean(false);
+            ba.position = 0;
+            Assert.assertTrue(ba.readBoolean());
+            Assert.assertFalse(ba.readBoolean());
+        }
+        
+        [Test]
+        public function testByteRoundTripping():void
+        {
+            var ba:BinaryData = new BinaryData();
+            ba.writeByte(255);
+            ba.writeByte(256);
+            ba.writeByte(-256);
+            ba.writeByte(-257);
+            ba.writeByte(-128);
+            ba.writeByte(128);
+            ba.writeByte(127);
+            ba.writeByte(-50);
+            ba.writeByte(50);
+            ba.position = 0;
+            
+            
+            Assert.assertEquals("Error testing post writeByte/readByte round-tripping", -1, ba.readByte());
+            Assert.assertEquals("Error testing post writeByte/readByte round-tripping", 0, ba.readByte());
+            Assert.assertEquals("Error testing post writeByte/readByte round-tripping", 0, ba.readByte());
+            Assert.assertEquals("Error testing post writeByte/readByte round-tripping", -1, ba.readByte());
+            Assert.assertEquals("Error testing post writeByte/readByte round-tripping", -128, ba.readByte());
+            Assert.assertEquals("Error testing post writeByte/readByte round-tripping", -128, ba.readByte());
+            Assert.assertEquals("Error testing post writeByte/readByte round-tripping", 127, ba.readByte());
+            Assert.assertEquals("Error testing post writeByte/readByte round-tripping", -50, ba.readByte());
+            Assert.assertEquals("Error testing post writeByte/readByte round-tripping", 50, ba.readByte());
+        }
+        
+        
+        [Test]
+        public function testUnsignedByteRoundTripping():void
+        {
+            var ba:BinaryData = new BinaryData();
+            ba.writeByte(255);
+            ba.writeByte(256);
+            ba.writeByte(-256);
+            ba.writeByte(-257);
+            ba.writeByte(-128);
+            ba.writeByte(128);
+            ba.writeByte(127);
+            ba.writeByte(-50);
+            ba.writeByte(50);
+            ba.position = 0;
+            //check read values
+            
+            Assert.assertEquals("Error testing post writeByte/readUnsignedByte round-tripping", 255, ba.readUnsignedByte());
+            Assert.assertEquals("Error testing post writeByte/readUnsignedByte round-tripping", 0, ba.readUnsignedByte());
+            Assert.assertEquals("Error testing post writeByte/readUnsignedByte round-tripping", 0, ba.readUnsignedByte());
+            Assert.assertEquals("Error testing post writeByte/readUnsignedByte round-tripping", 255, ba.readUnsignedByte());
+            Assert.assertEquals("Error testing post writeByte/readUnsignedByte round-tripping", 128, ba.readUnsignedByte());
+            Assert.assertEquals("Error testing post writeByte/readUnsignedByte round-tripping", 128, ba.readUnsignedByte());
+            Assert.assertEquals("Error testing post writeByte/readUnsignedByte round-tripping", 127, ba.readUnsignedByte());
+            Assert.assertEquals("Error testing post writeByte/readUnsignedByte round-tripping", 206, ba.readUnsignedByte());
+            Assert.assertEquals("Error testing post writeByte/readUnsignedByte round-tripping", 50, ba.readUnsignedByte());
+        }
+        
+        
+        [Test]
+        public function testBasicEndian():void
+        {
+            
+            var systemEndian:String = Endian.systemEndian;
+            //check we have a decisive systemEndian detection
+            Assert.assertNotNull(systemEndian);
+            
+            
+            var ba:BinaryData = new BinaryData();
+            var defaultEndian:String = ba.endian;
+            
+            var alternateEndian:String = (defaultEndian == Endian.BIG_ENDIAN) ? Endian.LITTLE_ENDIAN : Endian.BIG_ENDIAN;
+            var expected:Object = {};
+            expected[Endian.BIG_ENDIAN] = 218038271;
+            expected[Endian.LITTLE_ENDIAN] = 4294966796;
+            var bytes:Array = [12, 254, 255, 255];
+            for each(var byte:uint in bytes) ba.writeByte(byte);
+            ba.position = 0;
+            
+            Assert.assertEquals("testing endian:" + defaultEndian, expected[defaultEndian], ba.readUnsignedInt());
+            
+            ba.position = 0;
+            ba.endian = alternateEndian;
+            var result:uint = ba.readUnsignedInt();
+            
+            Assert.assertEquals("testing endian:" + alternateEndian, expected[alternateEndian], result);
+            
+            ba.position = 0;
+            ba.endian = defaultEndian;
+            Assert.assertEquals("testing endian:" + defaultEndian, int(expected[defaultEndian]), ba.readInt());
+            
+            ba.position = 0;
+            ba.endian = alternateEndian;
+            Assert.assertEquals("testing endian:" + alternateEndian, int(expected[alternateEndian]), ba.readInt());
+            
+            var leBA:BinaryData = new BinaryData();
+            leBA.endian = Endian.LITTLE_ENDIAN;
+            var beBA:BinaryData = new BinaryData();
+            beBA.endian = Endian.BIG_ENDIAN;
+            //int writing
+            beBA.writeInt(-500);
+            leBA.writeInt(-500);
+            //check they represent reversed byte sequence
+            Assert.assertTrue(reversedBytesMatch(beBA, leBA, 4));
+            beBA.position = 0;
+            leBA.position = 0;
+            //check they each read back to the same uint value
+            Assert.assertEquals('big endian', 4294966796, beBA.readUnsignedInt());
+            Assert.assertEquals('little endian', 4294966796, leBA.readUnsignedInt());
+            
+            beBA.position = 0;
+            leBA.position = 0;
+            //uint writing
+            beBA.writeUnsignedInt(4294966796);
+            leBA.writeUnsignedInt(4294966796);
+            //check they represent reversed byte sequence
+            Assert.assertTrue(reversedBytesMatch(beBA, leBA, 4));
+            beBA.position = 0;
+            leBA.position = 0;
+            //check they each read back to the same uint value
+            Assert.assertEquals('big endian', 4294966796, beBA.readUnsignedInt());
+            Assert.assertEquals('little endian', 4294966796, leBA.readUnsignedInt());
+            
+            
+            beBA.position = 0;
+            leBA.position = 0;
+            
+            //check they each read back to the same int value
+            Assert.assertEquals('big endian', -500, beBA.readInt());
+            Assert.assertEquals('little endian', -500, leBA.readInt());
+            
+            
+            beBA.position = 0;
+            leBA.position = 0;
+            
+            //short writing
+            beBA.writeShort(-500);
+            leBA.writeShort(-500);
+            //check they represent reversed byte sequence
+            Assert.assertTrue(reversedBytesMatch(beBA, leBA, 2));
+            beBA.position = 0;
+            leBA.position = 0;
+            //check they each read back to the same uint value
+            Assert.assertEquals('big endian', 65036, beBA.readUnsignedShort());
+            Assert.assertEquals('little endian', 65036, leBA.readUnsignedShort());
+            
+            
+            beBA.position = 0;
+            leBA.position = 0;
+            
+            //check they each read back to the same int value
+            Assert.assertEquals('big endian', -500, beBA.readShort());
+            Assert.assertEquals('little endian', -500, leBA.readShort());
+            
+        }
+        
+        
+        [Test]
+        public function testUTFRoundtripping():void
+        {
+            
+            //test big-endian round-tripping
+            var ba:BinaryData = new BinaryData();
+            ba.endian = Endian.BIG_ENDIAN;
+            ba.writeUTF('This is a test');
+            //writeUTF
+            Assert.assertEquals("basic post-writeUTF position", 16, ba.position);
+            ba.position = 0;
+            Assert.assertEquals("utf big endian round-tripping", 'This is a test', ba.readUTF());
+            
+            ba = new BinaryData();
+            //test little-endian round-tripping
+            ba.endian = Endian.LITTLE_ENDIAN;
+            ba.writeUTF('This is a test');
+            //writeUTF
+            Assert.assertEquals("basic post-writeUTF position", 16, ba.position);
+            ba.position = 0;
+            Assert.assertEquals("utf big endian round-tripping", 'This is a test', ba.readUTF());
+            
+        }
+        
+        
+        [Test]
+        public function testShortRoundTripping():void
+        {
+            var ba:BinaryData = new BinaryData();
+            //test LITTLE_ENDIAN round-tripping
+            ba.endian = Endian.LITTLE_ENDIAN;
+            ba.writeShort(255);
+            ba.writeShort(-50);
+            ba.writeShort(50);
+            ba.position = 0;
+            
+            Assert.assertEquals("Error testing post writeShort/readShort round-tripping", 6, ba.length);
+            Assert.assertEquals("Error testing post writeShort/readShort round-tripping", 255, ba.readShort());
+            Assert.assertEquals("Error testing post writeShort/readShort round-tripping", -50, ba.readShort());
+            Assert.assertEquals("Error testing post writeShort/readShort round-tripping", 50, ba.readShort());
+            
+            //test BIG_ENDIAN round-tripping
+            
+            ba.position = 0;
+            ba.endian = Endian.BIG_ENDIAN;
+            ba.writeShort(255);
+            ba.writeShort(-50);
+            ba.writeShort(50);
+            ba.position = 0;
+            
+            Assert.assertEquals("Error testing post writeShort/readShort round-tripping", 6, ba.length);
+            Assert.assertEquals("Error testing post writeShort/readShort round-tripping", 255, ba.readShort());
+            Assert.assertEquals("Error testing post writeShort/readShort round-tripping", -50, ba.readShort());
+            Assert.assertEquals("Error testing post writeShort/readShort round-tripping", 50, ba.readShort());
+        }
+        
+        
+        [Test]
+        public function testUnsignedShortRoundTripping():void
+        {
+            var ba:BinaryData = new BinaryData();
+            //test LITTLE_ENDIAN round-tripping
+            ba.endian = Endian.LITTLE_ENDIAN;
+            ba.writeShort(255);
+            ba.writeShort(-50);
+            ba.writeShort(50);
+            ba.position = 0;
+            
+            Assert.assertEquals("Error testing post unsigned writeShort/readShort round-tripping", 6, ba.length);
+            Assert.assertEquals("Error testing post unsigned writeShort/readShort round-tripping", 255, ba.readUnsignedShort());
+            Assert.assertEquals("Error testing post unsigned writeShort/readShort round-tripping", 65486, ba.readUnsignedShort());
+            Assert.assertEquals("Error testing post unsigned writeShort/readShort round-tripping", 50, ba.readUnsignedShort());
+            
+            //test BIG_ENDIAN round-tripping
+            
+            ba.position = 0;
+            ba.endian = Endian.BIG_ENDIAN;
+            ba.writeShort(255);
+            ba.writeShort(-50);
+            ba.writeShort(50);
+            ba.position = 0;
+            
+            Assert.assertEquals("Error testing post unsigned writeShort/readShort round-tripping", 6, ba.length);
+            Assert.assertEquals("Error testing post unsigned writeShort/readShort round-tripping", 255, ba.readUnsignedShort());
+            Assert.assertEquals("Error testing post unsigned writeShort/readShort round-tripping", 65486, ba.readUnsignedShort());
+            Assert.assertEquals("Error testing post unsigned writeShort/readShort round-tripping", 50, ba.readUnsignedShort());
+        }
+        
+        [Test]
+        public function testIntRoundTripping():void
+        {
+            var ba:BinaryData = new BinaryData();
+            //test LITTLE_ENDIAN round-tripping
+            ba.endian = Endian.LITTLE_ENDIAN;
+            ba.writeInt(65536);
+            ba.writeInt(-50);
+            ba.writeInt(50);
+            ba.position = 0;
+            
+            Assert.assertEquals("Error testing post writeInt/readInt round-tripping", 12, ba.length);
+            Assert.assertEquals("Error testing post writeInt/readInt round-tripping", 65536, ba.readInt());
+            Assert.assertEquals("Error testing post writeInt/readInt round-tripping", -50, ba.readInt());
+            Assert.assertEquals("Error testing post writeInt/readInt round-tripping", 50, ba.readInt());
+            
+            //test BIG_ENDIAN round-tripping
+            
+            ba.position = 0;
+            ba.endian = Endian.BIG_ENDIAN;
+            ba.writeInt(65536);
+            ba.writeInt(-50);
+            ba.writeInt(50);
+            ba.position = 0;
+            
+            Assert.assertEquals("Error testing post writeInt/readInt round-tripping", 12, ba.length);
+            Assert.assertEquals("Error testing post writeInt/readInt round-tripping", 65536, ba.readInt());
+            Assert.assertEquals("Error testing post writeInt/readInt round-tripping", -50, ba.readInt());
+            Assert.assertEquals("Error testing post writeInt/readInt round-tripping", 50, ba.readInt());
+        }
+        
+        
+        [Test]
+        public function testUnsignedIntRoundTripping():void
+        {
+            var ba:BinaryData = new BinaryData();
+            //test LITTLE_ENDIAN round-tripping
+            ba.endian = Endian.LITTLE_ENDIAN;
+            ba.writeUnsignedInt(65536);
+            ba.writeUnsignedInt(-50);
+            ba.writeUnsignedInt(50);
+            ba.position = 0;
+            
+            Assert.assertEquals("Error testing post writeInt/readInt round-tripping", 12, ba.length);
+            Assert.assertEquals("Error testing post writeInt/readInt round-tripping", 65536, ba.readUnsignedInt());
+            Assert.assertEquals("Error testing post writeInt/readInt round-tripping", 4294967246, ba.readUnsignedInt());
+            Assert.assertEquals("Error testing post writeInt/readInt round-tripping", 50, ba.readUnsignedInt());
+            
+            //test BIG_ENDIAN round-tripping
+            
+            ba.position = 0;
+            ba.endian = Endian.BIG_ENDIAN;
+            ba.writeUnsignedInt(65536);
+            ba.writeUnsignedInt(-50);
+            ba.writeUnsignedInt(50);
+            ba.position = 0;
+            
+            Assert.assertEquals("Error testing post writeInt/readInt round-tripping", 12, ba.length);
+            Assert.assertEquals("Error testing post writeInt/readInt round-tripping", 65536, ba.readUnsignedInt());
+            Assert.assertEquals("Error testing post writeInt/readInt round-tripping", 4294967246, ba.readUnsignedInt());
+            Assert.assertEquals("Error testing post writeInt/readInt round-tripping", 50, ba.readUnsignedInt());
+        }
+        
+        [Test]
+        public function testFloatRoundTripping():void
+        {
+            var ble:BinaryData = new BinaryData();
+            //test LITTLE_ENDIAN round-tripping
+            ble.endian = Endian.LITTLE_ENDIAN;
+            ble.writeFloat(86.54);
+            
+            
+            Assert.assertEquals("Error testing post writeFloat/readFloat round-tripping", 4, ble.length);
+            Assert.assertEquals("Error testing post writeFloat/readFloat round-tripping", 4, ble.position);
+            //check bytes to account for precision loss between double and float comparisons
+            Assert.assertTrue("Error testing post writeFloat/readFloat round-tripping", bytesMatchExpectedData(ble, [123, 20, 173, 66]));
+            
+            var bbe:BinaryData = new BinaryData();
+            //test BIG_ENDIAN round-tripping
+            bbe.endian = Endian.BIG_ENDIAN;
+            bbe.writeFloat(86.54);
+            
+            
+            Assert.assertEquals("Error testing post writeFloat/readFloat round-tripping", 4, bbe.length);
+            Assert.assertEquals("Error testing post writeFloat/readFloat round-tripping", 4, bbe.position);
+            //check bytes to account for precision loss between double and float comparisons
+            Assert.assertTrue("Error testing post writeFloat/readFloat round-tripping", bytesMatchExpectedData(bbe, [66, 173, 20, 123]));
+            
+            
+        }
+        
+        
+        [Test]
+        public function testDoubleRoundTripping():void
+        {
+            
+            var ble:BinaryData = new BinaryData();
+            //test LITTLE_ENDIAN round-tripping
+            ble.endian = Endian.LITTLE_ENDIAN;
+            ble.writeDouble(86.54);
+            
+            
+            Assert.assertEquals("Error testing post writeDouble/readDouble round-tripping", 8, ble.length);
+            Assert.assertEquals("Error testing post writeDouble/readDouble round-tripping", 8, ble.position);
+            
+            //check bytes
+            Assert.assertTrue("Error testing post writeDouble/readDouble round-tripping", bytesMatchExpectedData(ble, [195, 245, 40, 92, 143, 162, 85, 64]));
+            
+            var bbe:BinaryData = new BinaryData();
+            //test BIG_ENDIAN round-tripping
+            bbe.endian = Endian.BIG_ENDIAN;
+            bbe.writeDouble(86.54);
+            
+            
+            Assert.assertEquals("Error testing post writeDouble/readDouble round-tripping", 8, bbe.length);
+            Assert.assertEquals("Error testing post writeDouble/readDouble round-tripping", 8, bbe.position);
+            //check bytes
+            
+            Assert.assertTrue("Error testing post writeDouble/readDouble round-tripping", bytesMatchExpectedData(bbe, [64, 85, 162, 143, 92, 40, 245, 195]));
+            
+            
+            ble.position = 0;
+            bbe.position = 0;
+            Assert.assertEquals("Error testing post writeDouble/readDouble round-tripping", 86.54, bbe.readDouble());
+            Assert.assertEquals("Error testing post writeDouble/readDouble round-tripping", 86.54, ble.readDouble());
+            
+            Assert.assertEquals("Error testing post writeDouble/readDouble round-tripping", 8, bbe.position);
... 8476 lines suppressed ...