add comments for generator index
remove duplicate method to make code more DRY
add html2js task to the watch