Fixes/Adds/Removes tests for new structure

Merges in upstream/master

Branch coverage is 68.05%. This is partly due to ES3 fallback methods not being utilized on nodejs and AMD structure. More tests should be added for other misses in code, but that should not hold us back from merging in to have working tests.