Changed 'display_main_content' macro to account for widgets.
Dynamically added scripts for widgets into the widget_scripts block.