Refactoring photonui.Widget