Small changes to libyr.py