Added test which checks that everyone is in order.
Added query test, integrated various parts