This would also benefit from significant simplification. This is also using a lot of patterns that cannot be found anywhere else in the codebase and I'd like this to be as consistent as possible with other widgets.