widget structure and scripts