Merge pull request #1 from DaSayan/master

Fix of some bugs
Changed .pending to .undefined in javascript

Need to clarify if .pending is equivalent to .undefined or if they are both used.
Add html end tag after statistics 

This needs to be modified to be after scenario result lists eventually, but placing it here for now.