def parse_references(article):
    """
    Parse list of references from a given BeautifulSoup of an article
    """
    reference_list = []
    references = article.find('text').find('div', attrs={'type': 'references'})
    references = references.find_all('biblstruct') if references is not None else []
    reference_list = []
    for reference in references:
        title = reference.find('title', attrs={'level': 'a'})
        if title is None:
            title = reference.find('title', attrs={'level': 'm'})
        title = title.text if title is not None else ''
        journal = reference.find('title', attrs={'level': 'j'})
        journal = journal.text if journal is not None else ''
        if journal is '':
            journal = reference.find('publisher')
            journal = journal.text if journal is not None else ''
        year = reference.find('date')
        year = year.attrs.get('when') if year is not None else ''
        authors = []
        for author in reference.find_all('author'):
            firstname = author.find('forename', {'type': 'first'})
            firstname = firstname.text.strip() if firstname is not None else ''
            middlename = author.find('forename', {'type': 'middle'})
            middlename = middlename.text.strip() if middlename is not None else ''
            lastname = author.find('surname')
            lastname = lastname.text.strip() if lastname is not None else ''
            if middlename is not '':
                authors.append(firstname + ' ' + middlename + ' ' + lastname)
            else:
                authors.append(firstname + ' ' + lastname)
        authors = '; '.join(authors)
        reference_list.append({
            'title': title,
            'journal': journal,
            'year': year,
            'authors': authors
        })
    return reference_list