Set messages to an empty string so that if one isn't specified, it won't freak out. Added debug method as well.