Query Where Statement Improvements