Update sourcecode to add method handleAlert()