Changed delays
Smart page load delay calculation
Minor cleanup and security fix