Moved JS to a separate file
Updated documentation