Fix widget configuration not being applied properly.
Drive-by memory improvements and documentation