Fixed problem with built version requesting widget templates.

Also added a bunch of comments.