Remove jQuery dependency and beautify code

Also the code is world class code now