Converted tests to JavaScript.
Updated docs