Added some main js functions into sample js