Added code for popup messages.