Updated clear function to clear previous QR codes as well.