Cleaning up, removing window.alert dialogs