made addMessage a static function. added module rendering to template