Moved the auto-refresh JavaScript to a separate file