def load_column_names(filename):
    """
    Read the first line of the file and extract column names from it.
    Returns a dictionary with two elements:
        colnames        A list of column names
        indices         A dictionary of column indices, indexed by name
    """
    f = open(filename, 'r')
    line = f.readline()
    f.close()
    names = line.replace('#', '').replace(' ', '').replace('\n', '').split(',')
    indices = {}
    for i in range(0, len(names)):
        indices[names[i]] = i
    return {'colnames': names, 'indices': indices}
