Added start/stop time handling in the json interface

Code cleanup js. Added start/stop time in the request to the json
interface. Added more examples in the index file.