query engine, org structure fix, tests updated.