Clean the code and added browser detection to alert user