One more small thing - local variables are unnecessary here now since they are only used once: currTitleText, title, msg.