Refactored code: moved widgets into own module