Minor changes.

Modified some documentation and fixed bug in device.py.
Added script to perform all tests.