replaced global messages object with a borg class
moved global vars to config