Fix switched 'direction' and 'class' in parse.py