Indexed Scripts/Templates: Comments after review.

Integrating changes from review process.
Removing sharedString usages.
Adding some javadoc strings.
Removing dead imports and some un-used member variables in the RestEndpoints.

See #5921