Added checking for empty structure labels and fixed spacing

Under strange circumstances, $structure's first element is an object with only 'level' set. Thus, when the comparison `$level->label !== $struct->label` returns true because $level->label doesn't actually exist/is empty (not sure if isset should be used here), a blank label is returned.