Added some files from the Scala library that need amendment.
Initial amendments to the standard library.
Drop synchronized() calls, as JS is single-threaded.