def remove_dups(orig):
    """Remove duplicates from a list but maintain ordering"""
    uniq = set(orig)
    r = []
    for o in orig:
        if o in uniq:
            r.append(o)
            uniq.discard(o)
    return r