Code clean up on duplicate method.

Removed commented code ( for versions using QueryResource REST API).