Removing debug window.alert()