test passed for issue #10

Stilll a couple of things to refactor but much of the work is done. Need
to test querynig!