Improved widget handling and flexible output options