playing with mocha tests and improving functionality

* changing a few function signatures to make it more flexible
* beginning to implement quadtreearrays