Fixed bugs related to updating current/all pages data within popup, refactored all scripts, fixed page URL validation pattern