Modified queries as extension methods. Added PerformanceTest instrumenta...

...tion.