further cleaning up of basearray.py, include tests in _operation
use ipython notebook for debugging