Java script

Cleaned up the repo and made some changes to the api files