Fixed and refactored Widget