Added js plugin for widget initialization.

Improved example app and deleted unused template tags.