refactored widget strucutre for AttributeSets and Attributes