Implement basics for widget and layout handling.