merged core changes from escape-from-ecma-labs