Add instance tests, fix bug encountered in instances.py
5 files changed