Removed widget system-specific methods and replaced them with generic DOM approach.