Added start-script
Extracted the two vital methods
Pushed the sample code into the sample.js