def split_lines(file_lines):
    """
    Given all the lines in the file split based on the three sections and
    return the lines for the header and a list of lines for each section that
    is not 'None'.
    """
    section_lines = []
    for i, line in enumerate(file_lines):
        if line.startswith(("I.", "IA.", "II.")):
            section_lines.append(i)

    header = file_lines[:section_lines[0]]
    header += [file_lines[s] for s in section_lines]

    # Append comments to the comment lines
    for l in section_lines:
        file_lines[l] = '# ' + file_lines[l]
    t1_lines = file_lines[section_lines[0]:section_lines[1]]
    # Remove the space so table reads it correctly
    t1_lines[1] = t1_lines[1].replace('Mag Type', 'MagType')
    t2_lines = file_lines[section_lines[1]:section_lines[2]]
    t3_lines = file_lines[section_lines[2]:]

    lines = [t1_lines, t2_lines, t3_lines]
    for i, ll in enumerate(lines):
        if ll[2].strip() == 'None':
            del ll[2]

    return header, lines