Moved output initialisation into set_vars()