Adding widget.php to separate functionality