move scan script to view, add waiting for content page with refresh button