Created API and removed jquery depenency