add the {cd_get_company} smarty tag, fix a few minor bugs.