Added documentation. Updated JS library.