make the destructor of Widget virtual
improve the Input widget and remove an unused static function
minor improvements