Removing console and alert from code