Added more necessary info to the README.md file and refactored the javscript file

Signed-off-by: = <=>