Add instrument.py. Documentation changes