Allow multiple instances of widgets (todo: use proper object oriented javascript to achieve the same result)