closes #1 #2 and improves internal widget API