Adding more functions to javascript api
Adding enough code for trial run