Changed to use widget-template, other cleanups