add more comments to index controller and javascript file